Spyder Icon in Ubuntu Dash Not Working

I have installed Anaconda 3 (x64 Linux) on Ubuntu 24.04 and I am running Python 3.12.4. I want to add a Spyder icon to the dash (dock). I created a spyder.desktop file in the folder ~/.local/share/applications/spyder.desktop with the following entries:

[Desktop Entry]
Type=Application
Name=Spyder
Exec=/home/yvan/anaconda3/bin/spyder
Icon=/home/yvan/Dropbox/Work/Career/Software/Images/icon_spyder.png
Terminal=false

The icon does appear in the dash. However, Spyder won’t launch if I click on it.

If I run spyder from the terminal, the app opens normally, apart from a warning message:

Warning: Ignoring XDG_SESSION_TYPE=wayland on Gnome. Use QT_QPA_PLATFORM=wayland to run on Wayland anyway.
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled

I realize maybe spyder does not exist in that directory. My question is, where is spyder exec file saved in Anaconda3? What should I do to have the app on dash working?