After you setup a custom domain (e.g. contoso.com), as the default domain in Office 365, with a public Sharepoint website, you are unable to change the default A record for @ or WWW.
To overcome this scenario and point the default A record to an external location, follow the next steps:
1) On the Office 365 portal dashboard, go to "Manage your public website"
2) Select the option "Change address" and point to the initial value "x#y#z-public.sharepoint.com"
3) After changing, click on save and wait until the operation is complete
4) Once the process is complete you'll noticed that the "Refresh" warning will no longer be displayed
5) Go back to dashboard and select "Manage domains for your website and email"
6) Select the domain and "Manage DNS"
7) Now you can change the @ and WWW records of your custom domain.