Whether a response is submitted anonymously or tracked against the logged-in user depends on how the user accessed the form.
When accessing the form directly via the Teams app, or via a Team Members link, the submission is automatically tracked against the user's Microsoft 365 account.
When using the Anyone link, the submission is tracked anonymously.
Sharing the Team Members link
To stop responses from being submitted anonymously, make sure users are accessing the form using the Team Memberslink. To get this link:
In the forms list, click the ... (more options) menu next to your form.
Select Share.
In the dialog, open the Team Members option (this is the default) and copy the link.
Share this link with your users in place of any anonymous link.
Remove the anonymous link (recommended)
It's also a good idea to delete any existing public/anonymous link for the form. This prevents accidental access via the anonymous link, which would result in submissions not being tracked against a user account.

