After selecting "Erase phone's data" , the phone wipes off the data as soon as it gets spotted so selecting "Lock the phone" won't take effect. And regarding the password changing, I once erased my phone and after a day changed my google password. The password was changed without any issue.