I have tested that fdopen() can't be used to change fd mode (I've checked msvcr120 and ucrtbase, msvcrt was checked by your tests). That means that current behavior is correct.
I'm closing this MR. Please open new one if you find different solution for the problem you're trying to fix.