Instinctively, budgies want to go as high as they can for their own safety. This is why they choose to perch on your curtain rail.
It's good to see they have a cage top play area, but it could use come loving to make it more appealing for your birds.
Think about the fact that budgies live in the wild and would perch on trees and try and think oh how you can give them something like that as an area for them to perch.
I used to have the same issues with the birds going on the curtain rail. So I invested in some java wood perches and other items to make the cage top more appealing to them.
I'm not sure what that perch is being held up with, but I would remove it. If it falls while your budgies are on it, it'll give them a fright and I'm a little concerned with what it's being held on there with.
Remember budgies like to chew things and if that's toxic to them, it could kill them.
As well as getting more nicer perches for the top of the cage, I would also get them some toys to focus their attention on when they are out.
Most importantly though, your budgies shouldn't be let out while you are not there to supervise them.
The very issues you have would be solved if you didn't let them out when you weren't home.
Budgies will adapt to a set routine. Mine come out nearly all weekend (unless I have plans), but during the week they don't come out until about 5.30/6pm. This still allows me to give them out of cage time until 9pm, by which point I'll make sure they are all in their cage for the night.
If you let your budgies stay in their cage when you're not there, you will be cutting down the chance of them having an accident.
It will also stop the mess that you don't want to come home too.