My current solution is as follows:
func _enter_tree() -> void:
var par=get_parent()
var panel_n=StyleBoxLine.new()
panel_n.color=Color(0,0,0,0)
par.set_indexed("theme_override_styles/panel",panel_n)
get_viewport().transparent_bg=true
par.transparent=true
It applies a new transparent panel style to replace the old one.
This will make the background transparent and hopefully help people who encounter this problem