In this scenario, the transaction conflicts with another transaction that is not sufficient to replace itself, but is sufficient to replace itself when submitted with its children.
testmempoolaccept
Even if multiple transactions are served concurrently, each transaction is tested individually. Therefore, the parent and child are not evaluated together as a single package, and neither is accepted individually, so a failure is returned.
but, submitpackage
is an explicit RPC that evaluates transactions submitted together as a package. So it evaluates parent and child as a package, and both txs are successfully accepted because the package is sufficient to replace the original transaction.