@Chrisir so I tried to implement the solution you mention but it seems I may be doing it wrong.
As you can see in the editor below the ellipse is positoned correctly relative to the center of canvas but the coordinates it is getting from screenPosition() when checked against mouseX/Y are relative to the 0,0 screen corner (you can trigger the color change by hovering your mouse around the top left corner instead of the object itself).
Thanks for the tip. screenPosition works great but in my case it required some additional computation which I added in the editor. Thanks again @Chrisir. Marked as resolved.