I’m using unity 2020.3.25f1 and, whenever my character walks on the sides of the walls, he gets stuck in random places. I’m using the tilemap collider to add collision to these walls. I hope this makes sense, sorry if it doesn’t.
You probably need to pair your Tilemap Collider with a Composite Collider.
Watch this video starting at roughly 0:55.