In spectator mode:
Find a creeper, enderman, spider or cave spider
Left click
Effects begin
Then command /kill @s
Expected result: Effect disappears on respawn
Current result: When player respawns, the effect remains
(We’ve seen this since 1.20. We haven’t tested any earlier versions.)
Linked issues
duplicates
Comments

Thank you for your report!
We are tracking this issue in MC-46503, so this ticket is being resolved and linked as a duplicate.
If you would like to add a vote or provide any additional information to the main ticket, it would be appreciated.
If you haven’t already, please make use of the search feature to see whether an issue has already been reported.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki