Thanks for reporting this. It was a bug.
ThemeColours.SelectionBackground was losing the theme’s selection opacity, and custom PaintCellBackground drawing was being layered over the ListBox’s native selection tint. Together, those made the custom-painted cell appear noticeably darker.
I’ve fixed both issues. Custom-painted selected cells now match the native ListBox selection in both light and dark themes. The equivalent TreeView painting behaviour has also been corrected.
The fix will be included in the next release. Your original approach was correct, so no code changes should be necessary.
https://feedback.objo.dev/bug/1367