Quick answer: Tile physics polygons are drawn relative to the centre of the tile, offset by the tile's Texture Origin. If collisions do not line up, look for a changed Texture Origin, a TileSet tile_size that does not match the atlas region size, polygons drawn before the tile size changed, or a scaled TileMapLayer.
The player stands in mid-air above a ledge, or sinks halfway into the floor, and the collision shapes drawn with Debug > Visible Collision Shapes clearly do not match the tiles. The polygon data is fine; something about how it is positioned is not.
Make the problem visible
Turn on Debug > Visible Collision Shapes and run the game. Note whether the offset is constant (every tile shifted the same amount) or varies by tile. A constant offset points at settings shared by the whole TileSet; per-tile offsets point at individual tile data.
Cause 1: Texture Origin was changed
Each tile has a Texture Origin (under the tile's Rendering properties in the TileSet editor). It moves the *art* relative to the cell, typically to make tall tiles overhang the cell above. The physics polygon stays on the cell. If someone shifted the texture origin to fix how a tile looked, the art and collision now disagree. Reset it to (0, 0), or redraw the polygon to match.
Cause 2: tile size does not match the atlas
The TileSet's Tile Size is the size of a grid cell; the atlas source's Texture Region Size is the size of a tile in the image. If one is 16x16 and the other 32x32, every tile is drawn larger than its cell and collision (which follows the cell) looks offset and too small. Make them match unless you intentionally use oversized tiles.
Cause 3: polygons drawn before a size change
Physics polygons are stored in pixels relative to the tile centre. If the tile size changed from 16 to 32 after you drew them, they keep their old coordinates and now cover only the middle of each tile. Open the TileSet editor's Paint mode, choose the physics layer, and redraw — or use the Reset to default tile shape option in the polygon editor's toolbar for full squares.
Cause 4: a scaled or offset TileMapLayer
Scaling a TileMapLayer (or old TileMap) node scales its collision too, but scaling a parent and then offsetting children by hand often leaves the visual and physics layers inconsistent. Keep the tile node at scale (1, 1) and position (0, 0) within its level, and scale the camera with zoom instead.
Cause 5: CharacterBody shape offset
Sometimes the tiles are fine and the player is not. Check that the player's CollisionShape2D is centred where the sprite's feet are. A capsule or rectangle offset by a few pixels looks exactly like a tile collision problem.
Godot 3 projects
Projects converted from Godot 3 can carry odd per-tile offsets from the old autotile system. If only converted tiles are wrong, recreating their physics polygons in the Godot 4 TileSet editor is usually faster than hunting the stored offsets.