There should be no constraint on having a unique first name and last name. I just tried to replicate this on the demo instance (2.39) and could not.
Please include the version of DHIS2 you are using along with an extract of the server logs when the error happens and we can try and see what is going on.
OK, yeah, that unique constraint should not be there. I would try and remove that constraint from the database table, and then restart DHIS2 and see if it is recreated.
Yes. That constraint should not exist. I am not sure how it got added there, but it is not part of the standard set of constraints on a stock DHIS2 database.