No longer an issue in 1.18.2 Pre-release 3. You can mark this report as resolved now
Attached the data pack used. Use the command "/loot give @s loot potatopack:tarnished_banner" and attempt to place it on Peaceful difficulty in Survival.
The result should be that the banner is added back to your inventory through the function "potatopack:block/tarnished_banner/place/fail/start", but instead an invisible item takes up a slot. You can see that this happens if you pick up some other items or run other loot commands, and when you run the "/loot give @s loot potatopack:tarnished_banner" command manually again, the slot is updated
Unable to replicate the bug as it disappeared when I relaunched the game
Attached is an image of raiders entering at what would be the "edge" of the village (They were unfortunate to spawn in a cave too), where the villagers were currently at
To Anunay Jain (If pings are a thing forgive me cause I don't use this thing often): I do it with other mobs, but only Turtles, Mooshrooms & Zombie Horses seem to say in place yet they act as if they're in the new location
Can confirm in 1.21.4