@dnaumenko - Thank you so much! This works finally!!! Spent 3 days working on this. thank you. I wish someone updates the addedMemberGroup wix doc to mention this so others dont struggle with this.
One more thing i observed is to make your members join as “PUBLIC” by default you need to add Join the community field in your custom form and select it to yes by default apart from the setting the settings you mentioned above.