Update: Using Mesa 20 on Debian SID, the VSync error disappears.
However, the flashing and tearing remains. The compositor reports a new error on top of the error 3:
error 9: BadDrawable (invalid Pixmap or Window parameter) request 142 minor 1 serial 20401
Any clues?