Users have to log on twice and search function shows unexpected behavior

Nextcloud version (eg, 18.0.2): 18.0.10
Operating system and version (eg, Ubuntu 20.04): DSM
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.1): 7.3

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '...',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' => 
  array (
    0 => '...',
  ),
  'datadirectory' => '/volume1/data/nextcloud',
  'dbtype' => 'mysql',
  'version' => '18.0.8.2',
  'overwrite.cli.url' => '...',
  'dbname' => 'nextcloud',
  'dbhost' => '127.0.0.1:3307',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '...',
  'dbpassword' => '...',
  'installed' => true,
  'default_language' => 'de_DE',
  'default_locale' => 'de_DE',
  'knowledgebaseenabled' => false,
  'allow_user_to_change_display_name' => false,
  'skeletondirectory' => '',
  'htaccess.RewriteBase' => '/',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'enable_previews' => false,
  'theme' => 'custom',
  'updater.release.channel' => 'stable',
  'mail_from_address' => 'cloud',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => '..',
  'mail_smtphost' => '...',
  'mail_smtpport' => '25',
  'maintenance' => false,
  'loglevel' => 1,
  'trusted_proxies' => 
  array (
    0 => '...',
  ),
  'forwarded_for_headers' => 
  array (
    0 => 'HTTP_X_FORWARDED_FOR',
  ),
  'overwritehost' => '...',
  'overwriteprotocol' => 'https',
  'lost_password_link' => 'disabled',
  'filelocking.enabled' => false,
);

The issue you are facing:
We observe several strange behaviors. When users log in, the first login does not work and the login form is displayed again, but the second login always works. If you search for files, “No entries found in this folder” appears briefly and then the message “Search other locations”. Only files that are located in the current folder are found, these are then displayed and the message “Search other locations” continues to appear underneath. We use group folders and shared folders. What could be the cause for this?

2020-10-26-17-17-20

The problem that you have to log in twice is rare, but the search function does not work for any user. Nobody an idea for troubleshooting?