Get some pentrating oil on and let it soak into the threads for a while and make sure that your wrench is a superb fit.
And a tip from
@Igofar : apply the correct amount of pressure and don't try to increase it. Just maintain the same pressure. The nut/bolt yields after a while.
If one of them is tight, then undo that first. Slackening the others first will only make the other one harder to undo.
You can observe this effect when you tighten the fork leg pinch bolts. Do the first up to 22Nm, then the second to 22Nm. The first will then tighten a bit more. Then the second will tighten a bit more etc. The second bolt takes some of the load off the first.
So if you get one nut moving, don't take it off - put some penetrating oil on the thread and tighten it up again. Do the same with the others until you have moved all 4 nuts. Then undo them and remove them. Make sure that you clean the threads afterwards, remove the rust and leave them unlubricated and dry.
If you do not know what the correct amount of pressure is, and they are tightened to 65Nm, then get a nut and bolt with about the same diameter thread and lock the bolt in a vice. Tighten it to 65Nm. Then lean on it a little harder so that it just starts turning (so maybe about 70Nm). That is should give you a feel for how much effort is required to undo the final drive nuts.
So you are putting the socket and wrench on the nut and facing the back of the bike. The wrench / spanner is going to be pushed down as it sticks out away from the final drive. You are turning the nut anti-clockwise. Some of that force is going to try to lever the socket off the nut - so you may need to support the extension or the head of the wrench so that it cannot do that. I always hold the extension with my other hand - but a hydraulic jack could offer the support you need - so that all of the force is turning force - not forcing the socket / wrench off the nut.
And yes - one of them is very awkward to get at. I wish I could remember what tool I used - but it must be nearly 20 years ago since I did this for the last time. But I remember one being awkward.
Sometimes a little heat helps - but be careful how you do that - naked flame near penterating oil may not be the best combination in the world.