I am by no means an expert in Pi, raspberry or otherwise, always thought it would be interesting to use one for running block telegraph equipment, though.
Anyway - the likeliest culprit is the "screen"/drivers system for the 4 being different than the 3 in a library which I think is called Pi3D? And it itself is an interface to OpenVG, perhaps? The rectangle you are talking about is actually a transparent colored overlay, so that's where I would start trying to see what can be done.
This complaint seems familiar -> https://www.raspberrypi.org/forums/viewtopic.php?t=254790&p=1554370
Overall It seems like the color depth of the PI display is not the same as that of the Windows/Mac - and so transparent alpha values may not be mapped the same and choices may have been made for the sw platform that alter transparency in particular.
Sorry I can't be of more help,