I looked up this law, fwiw: https://avalon.law.yale.edu/18th_century/pennst01.asp . The actual provision is that non-residents of Pennsylvania could not keep slaves in the state for longer than 6 months. Unless those non-residents were "members of congress, foreign ministers [or] consuls".
The rules were considerably more complicated for Pennsylvania residents; the law basically grandfathered in existing slaves owned by Pennsylvanians and provided for a decades-long slow abolition as the children of existing slaves reached the age of 28.
It's interesting that the law exempted members of congress (and representatives of other countries, possibly for similar reasons) but not the president.