Leaving the world and re-entering dont give you protection
Related issues
is duplicated by
relates to
Comments

Thank you for your report!
However, this issue is Working as Intended.
The report you have submitted is working as intended as per the recently fixed reports MC-212 and MC-21650.
Please note, that mechanics of the game may change between updates.
Things such as graphics, sounds, world creation, biomes, redstone, villagers, and animals may not work the same in current versions.
Full Version History – Snapshot Version History – Feature Requests and Suggestions
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki
This is intentional. MC-21650 was fixed and had a Mojang priority. If a bug ticket has a Mojang Priority assigned by Mojang, that means Mojang does not intend that behaviour and Mojang wants to change that specific behaviour.