In order for the p5js library to recognize a global mode sketch, the moment the lib is loaded, it needs to find either setup() or draw() as properties of the window{} object.
If it can’t find any, it re-checks for them again when the page is fully loaded.
Under normal circumstances, it doesn’t matter whether the p5js lib is run before or after a global mode sketch.
However, if that LABjs happens to mess up how a web page loads, you’re better off executing the p5js lib after your global mode sketch.