Is the keypool erased when changing wallet password? In Bitcoin-qt, when a previously unencrypted wallet is encrypted, the keypool is erased and replaced with new keys.

Does this also happen when the password of an already encrypted wallet is changed?
No, because the encrypted keys don't change in that case.

When you encrypt a wallet.dat file, a random master key is generated, the master key is encrypted using your passphrase, and the actual address keys are encrypted using the master key.

When you change the passphrase, only the encrypted master key is changed.