Of course, PGraphics doesn’t work as well because it takes the mouseX / Y system variable.
My next idea is to detect the devicePixelRatio (which is the actual problem), that can be done in js code as showed here. When set to 1.0 with zoom. the sketch runs well. Then I would ask the user to temporarily adjust it to play the code. But honestly, there must be another solution, because I suspect that this will happen in P5.js mode as well.
@quark @GoToLoop @jeremydouglass @poboyd @anyone?