As it is an Engine related problem, did you considered using other engine for the game? As I know Unreal Engine 4&5 suppots HTML5, also you can easily port to other Target Platforms. The Paper2D system is very good, Also supports 2D lighting with Normal Maps and the Blueprint system makes everything a piece of cake.