Tilemap edge-outline collider

Hi! I make a top down rpg using tilemap and rule tiles.
But i dont understand how to make collider outside tilemap grid for prevent player go abroad.

In this example i had to draw edge collider and correct its coordinates manualy. But also i have a scenes with various and big tilemaps. I can’t use this method there, It takes too much time. Is there any way to do this faster? I can place around tiles with colliders, but it so slowly and unproductively.

@Breathing So are u making a gameobject or is this like a scene? I dont get what u r trying to do.