Draw rectangle over other applications' control elements

How do I write python code to draw (red) rectangle over control elements in other applications ?
For example, draw a red box around the digit 0, 1, 2,…9 of a window calculator application.

I understand I may need to create an overlay (transparent) window over the size of the control element in other applications, and then draw on this overlay window.

But not sure which library and what functions to use to create the overlay,

and if removing / deleting this overlay window achieve the objective of removing any drawing that overlays on the control elements ?