An issue was opened (and closed) against Processing 4 about this - see also this thread - Main thread task context API (LWJGL)
The current libp5x fork is based on 3.5.3. Processing 4 is a bit of a moving target at the moment. I’ll likely maintain a Java 11 / Processing 3 compatible version for a while, possibly with a JOGL renderer as an alternative option. Unfortunately can’t make this 100% compatible, as the JOGL code will need moving to another package because of Java module rules.