The change was announced well ahead of time: Planned breaking changes in Unity 6.5 [updated 2026-03-27]
InstanceID as a concept is fully obsolete in 6.5. It has to be an error because the old API doesn’t work anymore. It used to be an int but now it’s a long, so any code still treating it as an int needs to be updated as it won’t work correctly.