$ cat err.c
#include <stdio.h>
#include <unistd.h>

int main(void)
{
    fprintf(stderr, "foo");
    sleep(3);
    fprintf(stderr, "bar\n");
    sleep(3);
    return 0;
}
$ gcc -Wall -o err err.c

All of these show the output comes in two parts: first "foo", then "bar\n":

$ ./err 
$ ./err 2>&1 | cat 
$ ./err 2>file & for x in {1..8}; do ls -l file ; sleep 1; done

tested on Debian 9.4, libc6 version 2.24-11+deb9u3