Wow, that is really weird!
Are you sure it isn’t having power brownouts? Those can cause what appears to be wifi settings forgetfulness.
I wonder if there is some kind of corruption going on when it saves things. Would you try something for me?
Try setting it up in AP mode. Does it stick across reboots? If you put it back in client mode (connect it to your network), has the mystery gibberish network gone away?