This is a reccurrent problem with the python wrapper. Methods must be called via the class in their hierarchy that define them (see another case here). I suspect here you need to do:
PVCoordinatesProvider.cast_
(propagator)
Before calling getPVCoordinates.
Sorry if the examples in the repo are not up to date with Orekit 12.2. Please consider using the alternative wrapper based on jpype tech, there’s no need for such casts