Pywikibot will completely break whenever T95686: [Task] write a maintenance script to migrate properties from string to new identifier datatype is used, as it caches the property datatype for one hundred years, and has done that since April 2013 rPWBC6ea6d3330829: Split getting a property's datatype into its own request so it can be cached..
The simple workaround, e.g. for people using old versions of pywikibot, is to delete the apicache each time a property datatype changes, but that isnt a user-friendly solution.
Changes that could mean Pywikibot is less impacted by this:
Pywikibot could force a cache refresh more regularly.
Ideally we detect that a property has a new datatype, and clear the relevant cache entry.
Also, Pywikibot can eliminate the reliance on getPropertyType, as many code paths already have the properties datatype from when the entity was loaded, e.g. via wbgetentities. If getPropertyType is only used infrequently, the caching can be eliminated.