Only comments on the commits are lost. Comments on the Files tab of the PR itself are kept and you can "View outdated diff".
In our project we exclusively use comments on the Files tab precisely for that reason.
Well, I guess this explains why sometimes I saw comments on PRs disappear and sometimes they didn't, thanks.
The difference between commenting on the commit page and on the "files tab" is pretty subtle though...
Gerrit instead retains each rewrite of the "same" commit. It does this by requiring you to insert a "Change-Id: ..." footer into each commit message (it provides a repo hook to do this) and examines each incoming commit message to know whether that commit is a revision to a commit it's already seen.