Tilemap boxfill

So I have been working on a Binary Space Partitioning tree system to create a randomly generated tile dungeon. Its getting close but the issues I am now having is when it comes to creating the tiles on the tilemap.

I create the initial tilemap with a flood fill of the boundaryTile over my max and min dungeon size and have a scripted Tile for rooms that I loop through every generated room and use box fill, this works great and does what id want.

The issue comes however when creating and generating the corridors. I try to use box fill over the top of the rooms for each corridor. However from some research it seems that the box fill will only change tiles that are the same as the start position and seem to conform to the bounds of each room i generate which is weird.

Im hoping that someone might have some insight as a workaround to allow the box fill overide every tile or if there is a good alternative, as it seems that the documentation on tilemaps and general information on the internet for unity tilemaps is extremely scarce.

i ran into the same issue with Random brush
but since, by definition, tiles are random i fill all instead existing of exact same tiles

you could use TestRandomBrush with just one tile to see if it works like u want or just take the code