our website ist botiss.com and have a problem with the score on google pagespeed and gtmetrix.
First, I saw that the Javascript are loaded two times in the google report.
Secondly, I have been using your function as browser redirect and it makes our website wrong and some time this function does not work well as expect.
As per double JS scripts load, difficult to say from my side, but I see the same thing happen for others also not just WPML, so I wouldn't say it is related to WPML.
As per redirect, yes can be some issue and I suggest checking next docs, and if not really needed to disable browser redirect: