Hi @HTCS-Bobd,
As @alemabrahao noted there isn't a direct restriction/setting for the referenced use case, mainly because Apple changed the way that iOS displayed known PSKs previously with iOS 16. I believe in my previous testing, versions prior to iOS 16 you are unable to reveal the password (see below.)
That being said, I did do some testing on my iOS 18 device and was successfully able to prevent viewing of a MDM deployed SSID PSK when enabling the following restriction:
Please note that this will prevent users from joining any SSIDs outside of those defined & deployed with MDM configuration, and we advise testing with one device prior to enabling 'globally'. This is to ensure the WiFi Payload is properly configured as if improperly deployed, it could prevent the device from connecting to the internet and processing future commands.
If you found this post helpful, please give it kudos. If my answer solved your problem, click "accept as solution" so that others can benefit from it.