The builtin SetMouseSensitivity console command unfortunately stops working with Enhanced Input System. You need to replace the old style mouse sensitivity configuration with an Input Modifier instead.

Adding custom mouse sensitivity logic

See Configuring mouse sensitivity in Enhanced Input

Adding a console command

Once you have sensitivity set up, you can create a custom console command f.ex. through the CheatManager class:

void UMyCheatManager::SetAimSensitivity(float Sensitivity)
{
	auto* Subsystem = GetOuterAPlayerController()->GetLocalPlayer()->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>();
	Subsystem->GetUserSettings<UMyEnhancedInputUserSettings>()->SetAimSensitivity(Sensitivity, Sensitivity);
}