The problem occurs if the values of N and M are different. For example if N is 1 and M is > 1, then the trace shows how thread 0 could go through its critical section 1 time and finish. Then thread 1 is able to go through its critical section 1 time, but when it tries to go through a second time, it must wait indefinitely, even though no thread is in its critical section.
So progress is not met for this particular schedule.
But the progress requirement must be met for all possible schedules in order to solve the critical section problem. So this is not a solution to the critical section problem.