Email client not reacting to multimedia key if started from CLI

I have a keyboard with multimedia keys, including “mail” key. For my email client I use Claws Mail. If I start Claws Mail via a desktop file or via the mail key on the keyboard, then it sits in the tray and I can press the said key to open its window. However, if I launch Claws Mail from the command line, then it does not react to the said key. To open its window I have to mouse-click its icon in the tray.

Does anybody know why it can happen?

My DE is XFCE, if it matters.