DmitriyK
Basic Pleskian
The above problem occurred precisely because non-existent subdomains are sent to Plesk in a folder var/www/vhosts/default/htdocs404 error is not for "domain not found", but "resource not found" (e.g. a page, a file).
To catch all non-existent subdomains, create a subdomain with the wildard * character, for example *.mydomain.ru. Then place content into its home directory that returns the desired action, e.g. a PHP script that returns a 404 error code. Maybe you can simply choose to redirect the wildcard subdomain to an existing domain.
The question is a different topic. Maybe you can choose to create a separate thread for future add-on questions that have different topics.
I deleted it and after a few days (not immediately for some reason) the server stopped working.
I believe that by default, something that does not exist should not work, and in the settings of Plesk for some reason, the reverse is done