I've been looking at the new metadata module that has recently been added to ArcPy and having trouble with using it outside of ArcGIS Pro.
In the documentation (Metadata—Metadata module | Documentation) there is this sample:
import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\Projects\data_management.aprx")
aprx_metadata = aprx.metadata
print(aprx_metadata.title)
print(aprx_metadata.description)
This works fine in ArcGIS Pro e.g.

But when running outside of ArcGIS Pro it is not getting the metadata e.g.

This is using ArcGIS Pro 2.5.1. It seems to be okay for metadata on datasets, but not for projects, layers and maps from my testing. I'm not sure if this is a bug or if there is something else I need to be doing when executing the code outside of ArcGIS Pro?