Thanks, I think it helps as the default `mode-line-buffer-id` face of the active buffer is overridden, and it becomes the "inactive face". I think it solves this problem, but maybe a custom face in the mode-line faces group itself would be more accessible.

Another workaround I found was to use the `inverse-video` face option in the `mode-line-inactive` face. It doesn't give me too much freedom to customize the face.

On Sat, Jan 29, 2022 at 9:25 PM Drew Adams <drew.adams@oracle.com> wrote:
> Mode-line has face options for when it's
> active and inactive but `mode-line-buffer-id`
> just allows customization on the active form,
> please consider adding the option to allow
> customizing the face of the `mode-line-buffer-id`
> when the mode-line is inactive too.

See library `modeline-win.el'.
Does it do what you're looking for?

It highlights the buffer name in the
mode-line for the selected window.

That is, whichever window is currently
selected, its buffer name in the mode
line is highlighted (using face
`mlw-mode-line-buffer-id-selected-window').

The code is here:

https://www.emacswiki.org/emacs/download/modeline-win.el

It's just a few lines of code.