App won't use system theme when socket=wayland

Hello there!

I’m trying to build a Flatpak app but it doesn’t use the system theme when socket=wayland is set.
If I set socket=x11 it uses the theme correctly.
The problem is that I need socket=wayland for other features of my app.
Setting both doesn’t work either.
The app was developed in python with gtk3 (also tried gtk4, same problem).
Anyone knows how can I fix this?

Thanks in advance.