Finding the Primary Hierarchy Holder
One of the most important roles in Modern Public Folders is the folder with the Primary Hierarchy. This is one role that cannot be transferred either (ref article – Introduction to Public Folder Hierarchy Sync ). It is highly recommended that this Public Folder is placed on a database that is replicated to another server in a Database Availability Group (DAG).
In the GUI Interface
On an Exchange Server, we can find this mailbox by opening up the Exchange Admin Center (EAC), go to Public Folders and Public Folder Mailboxes:

PowerShell?
PowerShell reveals all, right? If you know where to look, then yes it can do that.
Get-Mailbox -PublicFolder | Ft IsRootPublicFolderMailbox
Which would reveal something like this:
Now you have two ways to validate the location of this important part of Public Folders.