“If you hear hoofbeats in the distance, it’s a safe bet to assume they’re horses instead of zebras”.
Vehicle manufacturers and Windshield Replacement Installers have used glue for many years now with no problem so it’s a safe bet to assume the problem isn’t the glue.
The actual problem / solution is to obsessively remove all the old adhesive and other “schmutz” from the window and rear view mirror before attaching with new glue.
Clean both parts thoroughly, sanding on the metal/plastic and acetone/pure alcohol on the window and mirror fitting and when you think you’re done do it twice more.
Be aware that acetone is dangerous, very flammable, potentially explosive and should only be used in in small quantities, in a well ventilated area free of sparks.
And if you have any doubt about your ability to DIY correctly, locate a quality professional Windshield Replacement firm to do the job for you.
I clean both surfaces with a new razor blade and isopropyl alcohol, mirror comes loose after three years.
The mirror landed on the center console and the glass cracked, I replaced the mirror with a used one. I purchased a new mirror from Rock Auto for $14, but the mount is smaller (included), however the old mount has not come loose in 5 years, I think I finally got some adhesive that was not expired. The new mirror remains in the trunk.