hmmm, after changing $subsite = $this->owner->Subsite(); to $subsite = Subsite::currentSubsite(); it is working now.
function updateCMSFields(&$fields) {
if($this->owner->MasterPageID) $fields->insertFirst(new HeaderField('This page\'s content is copied from a master page: ' . $this->owner->MasterPage()->Title, 2));
// replace readonly link prefix
//$subsite = $this->owner->Subsite();
$subsite = Subsite::currentSubsite();
if($subsite && $subsite->ID) {
$baseUrl = 'http://' . $subsite->domain() . '/';
$fields->removeByName('BaseUrlLabel');
$fields->addFieldToTab(
'Root.Content.Metadata',
new LabelField('BaseUrlLabel',$baseUrl),
'URLSegment'
);
}