As a bit of advice, tilemap colliders can have little parts jutting out and can stop colliders, an issue I have found in the game. To solve this, combine the tilemap collider with a composite collider. Hope I can help.
Thanks for the advice, but I am already using composite colliders for my tilemaps. There must be something else wrong with it