Is it the pure Exchange Online? Did you have migrated PF from Exchange On-premises?
You mentioned that you cannot create hierarchy public folder mailbox, but you can create secondary non-hierarchy serving public folder mailboxes, how did you verify this? Because the only difference between creating the primary hierarchy mailbox and a secondary hierarchy mailbox is that the primary mailbox is the first one created in the organization. How did you create the primary mailbox?
Please run the following command to verify that you have successfully created the primary public folder mailbox:
Get-OrganizationConfig | Format-List RootPublicFolderMailbox
Reference: Create a public folder mailbox in Exchange Online | Microsoft Learn