Yup- static does that.
Static variables stick around even after you end the game- you have to completely exit the engine for them to clear.
Try to avoid using static unless you can deal with them using non-static variables.
Ie a singleton that you override (don’t check if the pointer is valid) or a subsystem (they have managed life-times).