Do you write logic to handle collisions?
Wikipedia also adds: "the probability to find a duplicate within 103 trillion version-4 UUIDs is one in a billion."
Sort of the distinction between unspecified behaviour and undefined behaviour in C.
You need some UX like an error message in a red rectangle or something.
the solution might as well just be not to care about this case (no sarcasm).
Your application might not care about treating this error, but the DB will report it.