There is no option to disable/enable the anonymous optioN. However, you can hide this option on your community using a simple CSS code.
Community admins can do the theme changes, including hiding a section from the community, by adding a CSS code very simply. To makes the theme changes like this, go to your Admin Panel > Theme > Advanced Setting > Additional CSS.
Then insert the CSS code related to the changes you want to apply.
In this specific case, you can use the CSS codes below to remove the anonymous option from a question, or an answer.
display: none !important;