The plan cache assertion is performed via hashes, however, the plan cache entries may have different hashes (and engines, classic or sbe) across versions, which makes it hard to test.
Marking the test as multiversion_incompatible is an easy fix to the problem, without losing any of the test coverage