When I’ve encountered it I’ve had to create manual “placeholder” objects in the environment. For example creating a role with the correct script id but without the reference and then deploy the other objects and then updating the role again. Always felt it should be doable to build some logic to handle it but haven’t had an opportunity to dive into it. Would be very interested to hear if someone has managed to solve this