Why does include() call PublicStream::stream_set_option()?
It happens with PHP 7.4, where one of the backward incompatible changes is the following one.

When using include/require on a stream, streamWrapper::stream_set_option() will be invoked with the STREAM_OPTION_READ_BUFFER option. Custom stream wrapper implementations may need to implement the streamWrapper::stream_set_option() method to avoid a warning (always returning FALSE is a sufficient implementation).

Even with the latest code committed in Drupal 9, LocalStream::stream_set_option() triggers the user error you are seeing.
public function stream_set_option($option, $arg1, $arg2) {
  trigger_error('stream_set_option() not supported for local file based stream wrappers', E_USER_WARNING);
  return FALSE;
}