"Error while initialising OpenGL 4.3" on an RTX 3050

I installed citra nightly 1940 on my laptop (Flathub) and tried to run a rom of Pokemon Sun, but got an “Error while initialising OpenGL 4.3” error despite having opengl support upto 4.6 on my RTX 3050. Interestingly, i was able to run the .AppImage version of Citra Nightly 1941 without any issues at all. I ran this command to execute the AppImage: switcherooctl launch ./citra-qt.AppImage (to launch it using the discrete gpu)
Ive attached pictures of both the original error and the working version.
I suspect from the terminal output(shown in the picture) that it has something to do with the Wayland Display Manager that fedora 38 uses, but im no expert lol
Hopefully it can be fixed!!

System Information

Diagnostic Log
Upload your log file as an attachment by dragging & dropping.
Log of the non-working version:
citra_log.txt (5.2 KB)

It may be checking your iGPU. Try updating your drivers for your integrated AMD GPU.