How do I remove coliders using a Tilemap Collider?

I use a Tilemap Collider 2D in combination with a Tile Palette but everytime I remove a tile with the Pallete the coliders seem to stay. They are completely invisible because I can’t see them on any grid but my character does get blocked on the spots where I removed something. I don’t know if I am being stupid but I hope that with your help I can find a solution.

Just enable and disable the tilemap collider

code:

TilemapCollider2D collider = GetComponent();

collider.enabled = false;

collider.enabled = true;