Previously, the popover menu in sculpt/texture paint mode did not
take into account the UnifiedBrushSettings for the unit.
To fix this, the behavior of class _draw_tool_settings_context_mode is matched
by checking the same conditions when setting up the UI of the right-click popover menu.
Fixes T81616