Yes, what BT said, you should be able to take it all off still attached, hang it up on a bungee or similar – it's not best practise to let it hang from the pipework which can strain pipe / union.
If you do need to remove the actuator first, leave it attached to the hose and it will come out 'dry' and can be moved out of the way. Just refit it, no adjustments or 'special measures' required.
You should check in the 'window' to see whether you will need to DRAIN THE OIL BEFORE REMOVING THE SWITCH – the business end is in the 'wet' side of the gearbox.
Be mindful to ensure the O ring on the new switch seats correctly and doesn't get pinched or twisted on assembly – a smear of oil may help.
Check everything works as expected before taking it out !