It seems that DEVSENSE.phptools-vscode extension for Visual Studio Code is hardcoded to set up xdebug connection with specific parameters, which cannot be changed via configuration options.
Enabling internal logging in xdebug shows entries like this when the extension is enabled:
feature_set -i 2 -n max_data 8192
this effectively makes it impossible to observe (via xdebug) and copy variable values that are larger than 8kb, which is a very arbitrary choice of upper data limit.
Disabling the extension fixes this problem entirely.