You can also try this component; this should do what you want in your context.
It hides the username field and generates its value based on the name field, extracting only the first name.
It expects the following settings enabled:
full_name_required
prioritize_username_in_ux