I'm unsure whether this applies to Godot, but usually game engines come with a lot of unnecessary baggage. I think UE4 at its smallest was still something like 20 MB despite you not needing almost any of it. A 2D engine or renderer like PIXI.js makes more sense in these cases.