Water-logged glass may cause that. You may accidentally place water on glass, so it get water-logged, and spill water all around.
The "bug" datapack seem sus. Do you changed anything in it?
I have seen SO many dupe of this, but thankfully the Mod helped out!
How to reproduce it?
because "$$0" is null
No way... This is real problem to fix!
(Why you did not wait for the 1.18 to release completely to make the server on it? The 1.18 snapshot is unstable and will cause lots of problem during develop)
Dupe
Does your mouse work properly? I never heard this before...
I remember some report have this same problem. This is a dupe,