i think I found a fix.
in \opt\retropie\configs\all\emulationstation\es_input.cfg
I changed the inputconfig type line to this
<inputConfig type=”joystick” deviceName=”Virtual gamepad
” deviceGUID=”03000000030000000300000002000000″>
i found it from es_temporaryinput file.
That helped and the settings are sticking now
Thank you for all the help Herbfargus. Your videos on youtube have been helpful too