Problems with register_types.cpp with initialization level = Editor

Godot Version

4.2.2

Question

So I am trying to Initialize my plugin as soon as godot starts so I can try to import .vox files. However somehow the plugin only gets called when i start the game and not before. Does anybody have any ideas? Feel free to point out any other issues you might see. Do I have to do something with “EditorNode::register_editor_types();” ?
Register_types.cpp :

#include "register_types.h"

#include "gdexample.h"
#include "vox.h"

#include <gdextension_interface.h>
#include <godot_cpp/core/defs.hpp>
#include <godot_cpp/godot.hpp>
#include <godot_cpp/classes/resource_loader.hpp>
#include <godot_cpp/classes/resource_saver.hpp>
#include <godot_cpp/variant/utility_functions.hpp>
using namespace godot;

void initialize_example_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
        UtilityFunctions::print("1");
		return;
	}
    UtilityFunctions::print("2");
	ClassDB::register_class<GDExample>();
    UtilityFunctions::print("3");
}

void uninitialize_example_module(ModuleInitializationLevel p_level) {
	if (p_level != MODULE_INITIALIZATION_LEVEL_SCENE) {
		return;
        UtilityFunctions::print("4");
	}
    UtilityFunctions::print("5");
}

static Ref<ResourceFormatLoaderVox> vox_loader;
static Ref<ResourceFormatSaverVox> vox_saver;

void register_vox_types(ModuleInitializationLevel p_level) {
	UtilityFunctions::print("register");
    if (p_level != MODULE_INITIALIZATION_LEVEL_EDITOR) {
        return;
    }

    // Register the Vox_Resource class first
    ClassDB::register_class<Vox_Resource>();

    // Instantiate the loader and saver
    vox_loader.instantiate();
    vox_saver.instantiate();

    // Check if ResourceLoader singleton is initialized
    ResourceLoader *resource_loader = ResourceLoader::get_singleton();
    if (resource_loader != nullptr) {
        // Add the resource format loader
        resource_loader->add_resource_format_loader(vox_loader);
    } else {
        ERR_PRINT("ResourceLoader singleton is not initialized.");
    }

    // Check if ResourceSaver singleton is initialized
    ResourceSaver *resource_saver = ResourceSaver::get_singleton();
    if (resource_saver != nullptr) {
        // Add the resource format saver
        resource_saver->add_resource_format_saver(vox_saver);
    } else {
        ERR_PRINT("ResourceSaver singleton is not initialized.");
    }
	UtilityFunctions::print("Example library initialized.");
}

void unregister_vox_types(ModuleInitializationLevel p_level) {
	UtilityFunctions::print("unregister");
    if (p_level != MODULE_INITIALIZATION_LEVEL_EDITOR) {
        return;
    }

    // Check if ResourceLoader singleton is initialized
    ResourceLoader *resource_loader = ResourceLoader::get_singleton();
    if (resource_loader != nullptr) {
        // Remove the resource format loader
        resource_loader->remove_resource_format_loader(vox_loader);
    } else {
        ERR_PRINT("ResourceLoader singleton is not initialized.");
    }

    // Unreference the loader
    vox_loader.unref();

    // Check if ResourceSaver singleton is initialized
    ResourceSaver *resource_saver = ResourceSaver::get_singleton();
    if (resource_saver != nullptr) {
        // Remove the resource format saver
        resource_saver->remove_resource_format_saver(vox_saver);
    } else {
        ERR_PRINT("ResourceSaver singleton is not initialized.");
    }

    // Unreference the saver
    vox_saver.unref();
}



extern "C" {
// Initialization.
GDExtensionBool GDE_EXPORT example_library_init(GDExtensionInterfaceGetProcAddress p_get_proc_address, const GDExtensionClassLibraryPtr p_library, GDExtensionInitialization *r_initialization) {
	godot::GDExtensionBinding::InitObject init_obj(p_get_proc_address, p_library, r_initialization);

	//init_obj.register_initializer(initialize_example_module);
	//init_obj.register_terminator(uninitialize_example_module);
    
    init_obj.register_initializer(register_vox_types);
	init_obj.register_terminator(unregister_vox_types);
	init_obj.set_minimum_library_initialization_level(MODULE_INITIALIZATION_LEVEL_EDITOR);

	
	return init_obj.init();
}
}

Register_types.h :

#ifndef GDEXAMPLE_REGISTER_TYPES_H

#define GDEXAMPLE_REGISTER_TYPES_H

#include <godot_cpp/core/class_db.hpp>

using namespace godot;

void initialize_example_module(ModuleInitializationLevel p_level);

void uninitialize_example_module(ModuleInitializationLevel p_level);

void register_vox_types(ModuleInitializationLevel p_level);

void unregister_vox_types(ModuleInitializationLevel p_level);

#endif // GDEXAMPLE_REGISTER_TYPES_H