It is what it is, unfortunately - global script init runs before both gml_pragma and extension init, and there is no way to automatically ensure that extension gets initialized before that.
I’m currently working on a new version of the extension (for GMS2.3/GM2022+) that just has you call lua_init
yourself before you use any of it.