I had the same problem (update from version 4.13.3 to 5.0.3). And a ./console core:update indicated that everything was up to date.
But in the “matomo_tagmanager_container” table, the ignoreGtmDataLayer field was missing.
I manually modified my table:
ALTER TABLE matomo_tagmanager_container ADD ignoreGtmDataLayer tinyint DEFAULT 0 NOT NULL;