Interactive dialog do not open when triggered with a context menu

I have a plugin which registers a custom slash command which opens an interactive dialog. The plugin also adds a new item in the channel context menu. When I input the command manually and hit Enter the dialog shows, but when I click the menu item the dialog does not show.

I checked a network activity in my browser and both times, manual input and menu click, produces same requests with same payload for command execution.

Logs says that a request for the command execution passes correctly and 200 response is returned.

What do I do wrong? What else can I test/fix?

Steps to reproduce
I run on Mattermost v7.0.1

Here is the code of my webapp part of the plugin. Click on the menu item just executes the slash command.

import {Client4} from 'mattermost-redux/client';

import {id as pluginId} from './manifest';

export default class Plugin {
    initialize(registry) {
            'Do Something',
            (channelId) => Client4.executeCommand('/my_command', {channel_id: channelId}),

window.registerPlugin(pluginId, new Plugin());