Unable to permanently forget a WiFi network
I experienced the same behavior, and through quite a bit of trial and error, I have a pretty solid theory on why this happens.

I think as a "convenience", Android looks for 5GHz networks sharing the same root SSID as a 2.4GHz network and assumes that the password is the same. So for instance, if you have MyNetwork and MyNetwork (5GHz), you can connect to MyNetwork and Android will automatically try the same credentials on MyNetwork (5GHz).

There's nothing I've found on the Android side that will prevent this. The only thing you can do is to change the SSID of the 5GHz network so that it's completely different from the 2.4GHz SSID.