RPA Certifications - valid for how long exactly?

I would like to know after getting RPA developer certificate, for how long will it be valid? Do these certification exams need to be retaken every year or a few years?

Welcome to the community.

UiPath RPA Developer Foundation Training
UiPath RPA Developer Advanced Training
does not expire

Certificate of Completion RPA Developer Adanced
is valid 1 year.

Whether it needs refreshing is up to you. The validity of the certificate may be taken into account by the potential employer.

Will the exam questions remain the same if we take it for the 2nd attempt? Or will it be a totally different version of exam?

There is a specific pool of questions (more than in the test). In subsequent attempts, the questions are shuffled and the order of the answers is changed.