Minimal reproduction of a 1.18.2 Paper(?) issue causing item frames to appear in the wrong place on the client.
This test case creates a dirt floor and an obsidian pillar at 0, 4 ,0, then spawns item frames on each side of the pillar one block above the ground before setting them to face upwards.
The result should be something like this:

However on 1.18.2 Paper build 267 the initial result is this:

Reconnecting to the server, or flying away and back again to reload the chunks will resolve the issue.