Can may(verb) be interchanged with will in this
O believers! Bow down, prostrate yourselves, worship your Lord, and do ˹what is˺ good so that you may be successful. (22:77)
Although may shows uncertainty while will show certainty, may is interchangeable with will as per Britannica.com:
May (formal + old- fashioned)
used to indicate the reason for something or the purpose of something
Example:We exercise so that we may [=will] be strong and healthy.