That's the expected behavior if it is a server redirection. This is because AA referrer will not be set automatically on Page A but only on Page B where the document.referrer is Page A.
For page-level redirections, if the Adobe Analytics call was triggered before the redirection, the AA referrer value will be empty and thus you will see an empty value at the landing page (Here, Page B).
@andreis65119307 If u set s.referrer = s.Util.getQueryParam("ref"); for the url b/?ref= final value of s.referrer will be empty (s.referrer = ' ');,Appmeasurement library will considered this as s.referrer is not defined and it will assign document.referrer as s.referrer value. For avoiding this you can assign the value of as s.referrer="Empty" or s.referrer="none"(string value to be assigned) if s.Util.getQueryParam("ref"); value is null/empty or ' '.