Mutual exclusion will still be guaranteed as neither process can become critical before setting their flag (implying at least one process will enter the while loop).
The two techniques are complementary and comparison between the two can provide useful structural information such as in the case of the rule of mutual exclusion for centrosymmetric molecules.