The MANDATORY_SCRIPT_VERIFY_FLAGS constant was introduced in #3843 to distinguish between block consensus rules and relay standardness rules. However it was not actually used in the consensus code path: instead it only differentiates between the failure being reported as TX_CONSENSUS and mandatory-script-verify-flag-failed vs TX_NOT_STANDARD and non-mandatory-script-verify-flag.
This updates the list of mandatory flags to include the post-p2sh soft forks that are enforced as consensus rules via GetBlockScriptFlags(). The effect of this change is that validation.cpp will report TX_CONSENSUS failures for txs that fail dersig/csv/cltv/nulldummy/witness/taproot checks, instead of TX_NOT_STANDARD, which in turn adds Misbehaving(100) via MaybePunishNodeForTx in net_processing.