You can go to Islands after Studios closes at 5pm. Islands will get busier in the afternoon on as a result. But Islands also stays open later in compensation. So it might be open until 9-10pm nightly - and hopefully will have the Hogwarts light show on the castle.
You DO NOT want to take the Hogwarts Express to Islands in the late afternoon. Even with Express, it's a long wait as 5pm approaches. Exiting and walking between the parks will be much faster.
Studios tends to get quieter in the afternoons, so that 3-5pm can be a great time to hop on rides with lower waits. Like, 10-15min for Minions and similar waits. A few of the pathways might close, cutting off more direct routes (ie, the pathway to the right of Mummy might/will close, you can only enter from the "Fallon" direction. So it can be a little frustrating to figure out how to get places... but the lower crowds will offset the annoyance.
We've had a great time heading to Studios in the afternoon until 5pm close, having a dinner (or going back to the hotel), and going back to Islands around 7-8pm when the crowds there start to peter out.