Zend certified PHP/Magento developer

Disable the Config field after entering data

I am trying to disable the text field in the configuration field once admin has entered the data. I know it can be done via <frontend_model> but in that case the field gets disabled as soon as the page loads.

frontend_model class:

protected function _getElementHtml(AbstractElement $element): string
    {
        $element->setData('readonly', 1);
        return $element->getElementHtml();
    }

So, how can I disable it after the admin has entered value and saves configuration?