From your Safari menu bar top of your screen click Safari > Preferences then select the Autofill tab. Select: User names and passwords. Quit then relaunch Safari for changes to take affect.
I know what you mean, a few times I have lost a tab because of it. Will be trying new browser, that I can guarantee.
Turning on and off private browser safary <--- do this first 1 - Open up your Safari Web browser and choose 'Preferences' from the Safari pull down menu 2 - Click on the heading 'AutoFill.' 3 - Click on the box next to 'User Names and Passwords.' 4 - Close the 'Preferences' window. 5 - Go to a Web page that requires a password and enter in your chosen password. Safari will then ask if you would like to save this password. 6 - Click on the button 'Yes' in order to save the password. if it doesn't work, see if your safari delete the cache after a certain time, if yes disable it else give up ad log again