Because Spain is in the wrong time zone (located south of England but in the same time zone as the western part of continental Europe), the sun sets a lot later than one would expect.
It's definitely smart to check the websites of the attractions you want to visit. Some may adjust their hours seasonally. The sights and stores that observe the siesta may shift their closing period between winter and summer, shortening the afternoon break in the winter and closing a bit earlier.
One example of a schedule change: The Alhambra introduces nighttime hours at some point in the spring.
I spent April 2019 in Andalucia and then spent the next 1-1/2 weeks farther north, and I don't remember any difficulty with too-limited visiting hours. Things did get scrambled during Holy Week in cities taking that week's celebrations especially seriously. It seemed to be mostly a matter of adjusting to the disruptions caused by massive processions.