That's actually a good question. Do you mean during the game or in the editor? I've encountered this issue (ingame) and I solved it two different ways before:
Draw everything with tilebrush, then manually draw the edges with the appropriate tile. This was easy in my case since it is always entirely closed all around.
OR add additional space all around the tilemap and just use the tilebrush normally. This will kind of offset your tilemap grid so it's a little awkward to do so.
I think a setting to change the behavior on map edges could be interesting, but it's probably a little weird to implement since tilemaps can have weird sizes (including off-grid sizes) and also can have tiles outside the actual tile area, which can also be a little weird (draw tiles, resize tilemap smaller -> the tiles are actually still there, but invisible outside the actual tilemap object)