Italian here and vouching for the correctness of this. They picked an interesting way to "get out of jail", helped by flexibility in the scenario.
Another solution would have been to use the antiquated and formal "lei", which is gender-neutral, replaces the second person with a third, and technically defaults to feminine even when talking to a male (because it's short for "your person", "la sua persona", which is feminine in Italian) - although in practice this is not always the case and the verb can get gendered arbitrarily. "Voi" can also be used in the same way, but then the following verb is always gendered.
Another solution would have been to use the antiquated and formal "lei", which is gender-neutral, replaces the second person with a third, and technically defaults to feminine even when talking to a male (because it's short for "your person", "la sua persona", which is feminine in Italian) - although in practice this is not always the case and the verb can get gendered arbitrarily. "Voi" can also be used in the same way, but then the following verb is always gendered.