A combination of setFont() with rendering scale other than 100% breaks selected text color in TextArea. (No issue if setFont() is not called).
To reproduce, run the attached test case, moving the window between two monitors, one set at 100% rendering scale and the other at some other scale.
This bug is present in jfx19 and jfx20, on macOS and windows 11.
edit 2023/08/30: looks like the reason for the failure is rendered character size exceeding 80 pixels (80 is ok, 81 is not). When rendering scale is 200% (retina) the threshold font size is 40 (works, 41 does not).