A solution could be to create your own RegisterNewUser method that takes the order carrier as a parameter and returns a Person object. Then you can fetch the order after it’s been placed and associate to the correct user.
Functionally it would be very similar to the default implementation. That implementation will result in an exception if the user already exists and in that flow an error message is presented to the user.
In this flow you could first try getting the user via SecurityContextService.GetPersonSystemId(string loginName)
(login being their email) before trying to create it.
if (signUpCheckBox != null && signUpCheckBox.Checked)
{
this.Log().Debug("Sign up new user");
var person = _checkoutService.RegisterNewUser(kcoOrder.OrderCarrier);
checkoutOrder = klarnaCheckout.FetchKcoOrder(transactionNumber.Split('/').Last());
var order = ModuleECommerce.Instance.Orders.GetOrder(checkoutOrder.OrderCarrier.ExternalOrderID, Solution.Instance.SystemToken);
if (order != null)
{
var carrier = order.GetAsCarrier();
carrier.CustomerInfo.PersonID = person.SystemId;
carrier.CustomerInfo.CustomerNumber = person.Id;
order.SetValuesFromCarrier(carrier, Solution.Instance.SystemToken);
}
}