Spotify stops working every few days

No idea what the issue is, when I try to run the flatpak from terminal it shows some dependency error, but it makes no sense because I have the dependency, Currently spotify works but I’ll update this with whatever it is when it breaks again. For now the fix is running this command which just deletes the data from the flatpak

sudo rm -rf /home/sophie/.var/app/com.spotify.Client