Well done. I've never had one that stubborn!
Put some rubber grease round the O-ring when you put it back together.
I have used Deox-C with great success on one or two tanks and other parts.
https://bilthamber.com/product/deox-c/
It comes as a powder to mix with water. Hot water is better and you can even put a heater in the tank to keep it warm if you have one, I've never bothered with that.
Remember to seal off the breather and drain pipes, and the two bigger fuel ones, before you fill the tank with solution.
If you've got something to keep the solution in when you empty it out of the tank, it will still be useful, especially if you can warm it up again.
Run a little clutch and brake cleaner round the tank and tip it out after you drain the solution, it will absorb any remaining water.
You're going to need to take the fuel pump and filter out. There's an in line canister filter high in the tank which should be renewed and a "teabag" at the bottom of the pump, that should go again unless it's holed or really badly choked.
Check the internal metal tubes that the cap breather and drain connect to. Make sure they are clear right through.
A thick wire wound guitar string is good for rodding those out if they are blocked. Sometimes they take some unblocking, but persistence prevails.
Deox-C can help. I use a syringe to get a bit of solution into the pipes. You can keep the rubber tubes on the top end, it helps get the solution in.
Come back when you're ready to put the cap back in and we'll tell you how to get the rubber top seal in place..
