I actually found the problem.
It isn't a memory leak but somethign similiar.
Once a enemy is fought the event gets ereased until the player reentering the map.
And all currently earased events take up memory so by exsample fighting many enemies on various maps without revisiting the areas to reset the enemies will fill up the memory until the programm will crash once it exceeds 4gb.
The easiest solution would be to make random map encounters like most rpg's have to avoid using the erase event function so much.
Viewing post in Feedback (Demo & Public Versions)
I also did some test runs now in the sewers with the new changes and the memory usage dosen't increases after every fight now. So this should be fixed. Enemies won't get erased now then fighting with them, they only get pushed away, meaning tehy can be refighted as many times as you want. That's the solution I came up with.
Since I need to do a lot of rewriting to make that work for all area's I think the early acces version will be pushed back to next month so I can take care of that first.