Setting the field options to Validate for Unique Value is not ideal as you cannot directly modify this field in the form.
But your script can detect the validation error and handle the error instead of just letting field options display the validation error message.
You can also use either a self join relationship that links two occurrences of Table 2 by this ID field to count the number of matching records as a way to detect a duplicate.
A SQL query inside ExecuteSQL could also be used.
But please note that your ID is not the ideal ID to use in order to link records in a relationship. It would be better to use an auto-entered serial number or the text returned by Get (UUID ) for that purpose. If you have to use this ID to satisfy other requirements, set it up as a field in your table so that searches, sorts and labels can use it, but don't use it as your primary key in relationships.