Taking off the khufoof does not invalidate wudoo’ according to the more correct view, so the one who takes off his khufoof may pray with his previous wudoo’.
See the answer to question no. 100112.
One of the conditions of wiping over the khufoof or socks is that they should have been put on when in a state of purity. This has been explained in the answer to question no. 9640.
The one who renews his wudoo’ and wipes over his socks, then takes them off, then puts them on again before breaking his wudoo’, can be said to have put them on in a state of purity, so he may wipe over them.
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) said: We said that if he takes off the khufoof he does not break his wudoo’, and this was also said by others. But none of those who said that wudoo’ is not broken said that it is permissible to put them back and wipe over them. We tried hard but we did not find anyone who was of this opinion, otherwise it would be a sound view.
Questioner: Even if he is wiping over them to renew his wudoo?
Shaykh: No. If the wiping is to renew wudoo’, what that means is that the first wudoo’ was not invalidated, so it is permissible to wipe over them after taking them off. Similarly if we assume that he did not wipe over them then he took them off when still in a state of purity, before wiping over them, then he put them on again, there is nothing wrong with that. End quote from Sharh al-Kaafi.
And Allaah knows best.