I have not changed my Shopify theme yet so I do not sure what will happen when you do it. Anyway, I found an ultimate guide on changing Shopify theme on Avada. This guide is a step-by-step guide so you can follow steps on this guide and change your theme easily.
Hope it's useful for you.
Hank here from Shopify. Really great question!
When changing themes, although things like your products, collections, and pages will carry over, any custom coding that would have been done previously would not transfer to the new theme. The reason for this is that your new theme's template files would replace any previous files you would have had.
What you can do however is once you change your theme, you will see that your old theme is still located in your theme library. This way you can revert to your old theme or compare the code if needed.
Depending on who your theme developer is with your new theme may be able to support any coding changes you need or want to transfer. I will share this guide which will help you locate who your theme developer is.
Another option would be to reach out to one of our Shopify Experts, who you can hire to do almost any custom work on your store. If you were to reach out to them about this query, they would be able to resolve this issue for you also.
Let me know how you get on with this or if you have any further questions!
All the best, -Hank