Window capture - Spotify won't display

Recently I was able to capture a Spotify window and it displayed perfectly. Now it will only show three grey dots at the top left. When playing Spotify, the track name comes up, but nothing appears except these three dots! It's mysterious, as it was working a couple of days ago. All other windows appear perfectly.
Has anyone experienced this?
I'm not sure if this will help anyone...I turned off "Hardware Acceleration" in the Spotify menu and then relaunched the app. OBS started displaying the window capture properly. Then I turned hardware acceleration on again, relaunched and it still worked! It could be a solution as it's related to the redrawing of the window via GPU. Who knows?

Screenshot 2022-07-01 at 14.48.42.png

The issue was that unless the Spotify app was in the foreground (active), OBS would not display anything except a black screen with three greyed out dots on the top left.