Why are there leaked instances for scripts that haven't been instanced yet?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Bupintong

When closing my game with the X button or our own Quit button the logs say that there’s the following error:

ERROR: Condition "_first != nullptr" is true. at: ~List (./core/self_list.h:108) - Condition "_first != nullptr" is true.
ERROR: Condition "_first != nullptr" is true. at: ~List (./core/self_list.h:108) - Condition "_first != nullptr" is true.
WARNING: ObjectDB instances leaked at exit (run with --verbose for details). at: cleanup (core/object.cpp:2070) - ObjectDB instances leaked at exit (run with --verbose for details).

Leaked instance: GDScript:1595 - Resource path: res://status_effects/status_effect.gd
Leaked instance: GDScript:1594 - Resource path: res://status_effects/burn_status/burn_status.gd
Leaked instance: GDScriptNativeClass:640

Hint: Leaked instances typically happen when nodes are removed from the scene tree (with `remove_child()`) but not freed (with `free()` or `queue_free()`).

ERROR: Resources still in use at exit (run with --verbose for details). at: clear (core/resource.cpp:417) - Resources still in use at exit (run with --verbose for details).
Resource still in use: res://status_effects/status_effect.gd (GDScript)
Resource still in use: res://status_effects/burn_status/burn_status.gd (GDScript)

Both scripts (status_effect.gd and burn_status.gd) are only inside preloaded Scenes, none of the other nodes inside the scenes give this error and both of this scripts inherit Node, yes, it should give a leak since it doesn’t keep reference count, but the scene hasn’t been instanced and even if it did, when it automatically dies because of the scene_tree exiting it should also take the “leaked” scripts with it.

Why does this happen? this should happen if the nodes where removed from their parents and never freed, but these are never instanced.