I changed the URL of a sharepoint online site, but now I need to change it back to the original URL. Neither the admin portal nor the Powershell command (Set-SPSiteURL) allows this because the original URL is still taken somewhere. If I do a Get-SPOSite on the original URL, the site comes up, with the owner as SHAREPOINT\system. However this site is not listed in the admin portal in Active sites or Deleted sites. I don't see anything in the recycle bin of the renamed site. Where else could I look to find this site? Additionally, does SP actually make a copy of the site when the URL is changed?
When you move a SharePoint site, it creates a stub site at the original URL using the REDIRECTSITE#0 template.
You can use
Remove-SPOSite to remove the redirected stub site. You may need to wait a bit, but you should then be able to move your site back to the original URL.
More information on how to manage these site types is available at Manage site redirects