is my xPub published when I make a payment? (wallet privacy) I'm generating new addresses for every payment I receive, but what happen when I transfer the bitcoins from my wallet to another address?
is my xPub exposed when doing that (maybe to the bitcoin node?)
if yes, what is the recommended way to avoid exposing my full wallet history?
No, the xpub is not published anywhere. Only individual public keys are published and those are permanently stored in the blockchain. There is also no way for someone to figure out the xpub and any related keys given just those public keys.