p2pkh vs. p2pk keeping public key private
Bitcoin addresses, and the public key by extension, should ideally only ever be used once. So your time of exposure of the public key in P2PKH  is the time between when the spend is made and when it confirms. For P2PK the public key is always known to everybody. There's a considerable difference between the two.