It happens for me even with webpage password fields in chrome - but it needs to be foregrounded to cause the issue there. My biggest issue has been Chrome Remote Desktop, as the window might be open in the background, but if it gets logged out (as it does from time-to-time) it will show the password to log back in, and as you say, for native apps, it does not need to be in the foreground... queue WTF moment.