You could follow below steps to open migrated ASPX files.
1.Enable custom script by using PowerShell.
#Config Parameters
$AdminSiteURL="https://tenant-admin.sharepoint.com"
$SiteURL="https://tenant.sharepoint.com"
#Get Credentials to connect
$Cred = Get-Credential
#Connect to SharePoint Online Tenant Admin
Connect-SPOService -URL $AdminSiteURL -Credential $Cred
#sharepoint online enable custom scripts powershell - Disable DenyAddAndCustomizePages Flag
Set-SPOSite $SiteURL -DenyAddAndCustomizePages $False
2.Download all ASPX files, delete all ASPX files in the document library, upload them into document library again by using upload button. Then you could open migrated ASPX files.
If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.