Nextcloud + (MS) Office Online sharing not working as intended

Hello everyone. I am having problems with sharing my documents with Microsoft Office Server.
When i try to share document via public link - it only shows document preview and “Download” button, but i expect this document to be editable or viewed with Office Online app.
If i share a folder with a single document in it - it works fine, i can view or edit document online.

Nextcloud version 28.0.4
Operating system and version: Oracle Linux 8
Apache or nginx version: Apache/2.4.37
PHP version: PHP 8.3.4
Office Online plugin version: 2.1.2
Office Online server version: 16.0.10338.20039, Windows Server 2019

The issuei am facing:

Document is not viewed properly with public share link.

Steps to replicate it:

  1. Create any document in nextcloud
  2. Generate public share link of this document (view only or with edit permissions, doesn’t matter)
  3. Document is viewed only as preview
  4. Edge console shows error:
The following mime is already registered
  1. Nextcloud log shows error:
no app in context

QueryNotFoundException
Could not resolve OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener! Class "OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener" does not exist
Could not load event listener service OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener: Could not resolve OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener! Class "OCA\Officeonline\Listener\SharingLoadAdditionalScriptsListener" does not exist. Make sure the class is auto-loadable by the Nextcloud server container
Nextcloud config
<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'nextcloud.domain.com',
  ),
  'trusted_proxies' => 
  array (
    0 => '10.0.1.104',
  ),
  'datadirectory' => '/storage/nextcloud-data',
  'tempdirectory' => '/storage/nextcloud-temp',
  'dbtype' => 'pgsql',
  'version' => '28.0.4.1',
  'overwrite.cli.url' => 'https://nextcloud.domain.com',
  'dbname' => 'nc',
  'dbhost' => 'srv-pg01.domain.com:5432',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'localhost',
    'port' => 6379,
  ),
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'domain.com',
  'mail_smtphost' => 'mail.domain.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'nextcloud@domain.com',
  'mail_smtppassword' => 'y*',
  'mail_smtpsecure' => 'ssl',
  'maintenance' => false,
  'theme' => '',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Movie',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',
  ),
  'loglevel' => 2,
  'maintenance_window_start' => 1,
  'app_install_overwrite' => 
  array (
    0 => 'officeonline',
  ),
);