I have a command link button on Account page (Create Account). As soon as a user clicks on the button, an edit page gets populated to fill the details. Once the details are filled and hit the save button, then account gets created and redirects the user to the account record detail page that got created. This works in Visualforce but if I switch to Lightning it doesn't redirect me to the detail page of the created record but remains on the same account page, but record gets created in Lightning as well.
The expectation is that once the record is saved , it should go to the record detail page as it works smoothly in classic but not in lightning
Apex controller:
return new pagereference('/'+acc.Id+'/e?&nooverride=1&saveURL=/apex/Address_Validation?addressType=AccountBillingAddress&id='+acc.Id+'&retURL='+acc.Id);