As you can see, we changed the format of the ID's of the OctopusServerNode table, and it caused this problem for HA installations.
You can safely delete the Server02 entry from the OctopusServerNode table.
You are correct, it is possible you will encounter the same issue on your production cluster.
The two options are:
Stop the Octopus Server service on all nodes in the cluster, and bring them back up as you upgrade them. We're very aware this defeats the purpose of a HA cluster, so...
You can do the same as in your test environment, and delete the phantom record (if it appears) from the database after the upgrade. For safety, I would recommend putting the cluster in maintenance mode, to ensure the legacy node ID is not written into any other tables.
Again, we sincerely apologize for the inconvenience. Please don't hesitate to ask if there is anything else we can do to help.