However, if I change the properties of the drawing tool to make it global, it appears that the original object is terminated, and a new global instance is created. This results in the loss of the subscription to the data feed, and the functionality of monitoring the ray is disrupted.
How can I manage the transition to a global object while maintaining the subscription and ensuring the tool continues to function as intended?

Comment