None of my previous, or current, employer would never disclose salary as part of a reference request.
For many many years, in my sector, the references always just say:
"Ms. X worked here between Jan 2018 to July 2020 as a Widget Maker."
As in, just your name, your dates of employment and last position.
That's it, nothing more or less.
As a manager, I'm not permitted to include any other information even if it's asked for - and if it is, it has to come from me as a personal, subjective reference, in a letter, with NO company letterhead. And there's no way I'd do that for 99% of my staff, a personal letter of recommendation is not appropriate. I have done it to a resigning employee who had been with us for years, was excellent, and she had applied to uni as a mature student... but that's the only time i ever wrote a "personal" (non company) reference.
I'd end up in hot water with HR if i ever tried to share salary info during the exit process!
(as a random aside, i'd never disclose this during applications or screenings.. only an expectation, which should be based on market rate research, location, etc... data, not opinion.)