There are ways to detect private browsing by querying browser features or behaviours that are different in private browsing.
For example, in Firefox calling Navigator.serviceworker
returns undefined
if private browsing is enabled.
Check out this script for ways to detect this in popular browsers:
https://github.com/Joe12387/detectIncognito/blob/main/src/detectIncognito.ts
It only becomes a self-fulfilling prophecy if you go into every situation thinking like that. Most people are pretty decent, it's only that they try to do what they believe is right.