Inscriptions in their current form can be filtered by matching against non-executed conditional script branch opcodes, that is OP_FALSE OP_IF. This is what Knots does in CScript::DatacarrierBytes
Core proponents state that this is not good enough since, were this logic to be applied everywhere, inscription spammers would find another way to push their data.
GitHub
bitcoin/src/script/script.cpp at 271fd206893a164b2d1c2d1c44c3696d23dd10e9 · bitcoinknots/bitcoin
Bitcoin Knots enhanced Bitcoin node/wallet software - bitcoinknots/bitcoin