I don't know if it's intended.
Maybe the possible bug is that the creative inventory moves when the effect is added to the player.
So, the first screenshot is before the effect
The second screenshot is the player having the effect
And the third one is after the effect but before the reopening the inventory
Thank you for your report!
However, we are already tracking this issue, and this report is a Duplicate of MC-193348, which is a report that has not been resolved yet.
If you want, you can upvote the parent ticket, and enable watching to receive any updates about it - if you believe you have any information that may be important for this issue, please leave a comment on the parent. Please also use the search function in the future to prevent duplicate reports.
Quick Links:
📓 Issue Guidelines – 🛠 Community Support – 📧 Customer Support – ✍️ Feedback and Suggestions – 📖 Game Wiki
💬 Mojira Subreddit – 💬 Mojira Discord