Install the AUR package libayatana-appindicator-glib (https://aur.archlinux.org/packages/libayatana-appindicator-glib) and launch spotify with the environment variable LD_PRELOAD=/usr/lib/libayatana-appindicator-glib.so.2. This solve the broken close button as a temporary solution. I use KDE Plasma.
https://aur.archlinux.org/packages/spotify#comment-1059234
Fedora 43
Gnome 49