The bug
Blocking a guardian attack with a shield decreases its durability and absorbs some damage. It doesn't make sense, because laser is not a melee attack.
Linked issues
Comments


Even without an unbreaking enchanted shield, the damage is reduced if blocking with a shield but in return the durability is decreased at the same time.
Can confirm in 21w03a.
Affects 1.21. Related to MC-225132 as well, as the underlying issue seems to be that the guardian beam is considered a melee attack.

Also related to MC-262596.
Cannot reproduce. While the laser still inflicts damage, the damage is reduced greatly (1/2 heart compared to 3 hearts). That in itself might be a bug, but is different than that which is reported here.