Custom Node not updating objects automatically while code copied directly in the work space does

I had a similar issue recently: