The anchor selection algorithm is specified to only select a non anonymous block box or text node. This means that display: flex element can't be an anchor node.
It appears that Chrome allows display: flex to be anchors in this test case.
The specification should probably be updated to allow this, unless this is a bug in Chrome.