The Guardian's laser deals knockback, wich should throw the player away from the guardian, but when the player blocks the laser with a shield, they get knocked towards the guardian. This happens both in and out of water, but is more obvious on land. It is more obvious when in 3rd person.
link to video (too long to upload): Minecraft 1.21.1 - Singleplayer 2024-08-28 22-03-58.mp4
the attached images are how it looks from 3rd person
Steps to Reproduce:
Spawn a Guardian/Elder Guardian and trap it in a minecart
Get a shield
Switch to survival
Block the Guardian's laser attack with a shield
Take note of the direction the knockback throws you
Expected Behavior
Guardian's laser attack knocks a player with their shield up away from the Guardian, this is the case in Bedrock Edition
Observed Behavior
Guardian's laser attack knocks a player with their shield up towards the Guardian
Linked issues
Attachments
Comments

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