Please try to add `query-replace-defaults` (and also optionally `query-replace-history`) to `savehist-additional-variables`.