Thank you both for the responses. The deprecation message is, I believe, a warning message. Although the code is deprecated, it hasn't been removed from the Mediawiki core (https://www.mediawiki.org/wiki/Manual:Hooks/EditPageBeforeEditToolbar). The reason it still exists in the TinyMCE extension is to maintain backward compatibility with Mediawiki version 1.35, which is the current long term stable version, and still widely in use. It appears that the problem is being caused by the Mediawiki system reporting the warning when PHP errors are activated, rather than the the existence of the deprecated code itself in the TinyMCE extension.
It seems that, when Mediawiki outputs an error message, the page output is no longer in standards mode (https://www.tiny.cloud/blog/tinymce-requires-standards-mode/). This is potentially a bug in Mediawiki as, without error reporting, Mediawiki does output pages in standards mode, as Activede points out. This might be considered as a bug in Mediawiki not trapping and handling php warning error messages in a way that allows execution to proceed, although there are ways to debug mediawiki that might allow this (https://www.mediawiki.org/wiki/Manual:How_to_debug) by using a log file for error messages. Alternatively you could use the following in local settings, which means only fatal php error will be output to the browser page (note the +ve '1' not -ve as in the Mediawiki documentation:
error_reporting( 1 )
I hope this works for you but, if not, please let me know.