In the documentation it is said that:
https://developer.atlassian.com/cloud/jira/platform/deprecation-notice-user-privacy-api-migration-guide/
Changes to the visibility of user information: Users will be able to restrict the visibility of their personal data through their user profile privacy settings, or in the case of a managed account, the visibility settings that are decided by the site administrator. This means that fields such as email will only be returned by the API if the user has permitted that data to be visible. Note that this means that some fields can be null. The REST API changes will be introduced alongside the existing REST API. The existing REST API will be available until the end of the deprecation period. Until this time, you can use either the GDPR-compliant or non-GDPR compliant version of the REST API. An opt-in mechanism will be provided for testing at a later stage. This mechanism will force Jira Cloud to only use the GDPR-compliant version of the REST API (that is, deprecated data is not used).
I was not able to reproduce the issue.
I was able to remove the user settings. Through this:
https://confluence.atlassian.com/doc/user-email-visibility-138596.html
But how to reproduce the issue stated above by completing removing the visibility of their personal data through their user profile privacy settings