Why LVGL performs incorrectly when cancel direct mode?

What happened when i cancel display direct_mode when i use lv_port_win_codeblocks-release-v8.3?
LVGL Version:8.3.0
Here is my code:

    lv_obj_t* btn1 = lv_btn_create(lv_scr_act());
    lv_obj_set_size(btn, 200, 200);
    lv_obj_align(btn, LV_ALIGN_TOP_LEFT, 0, 0);
    lv_obj_set_style_bg_color(btn, lv_color_make(0xCC, 0x00, 0x00), LV_PART_MAIN);
    lv_obj_t* btn2 = lv_btn_create(lv_scr_act());
    lv_obj_set_size(btn2, 200, 200);
    lv_obj_align(btn2, LV_ALIGN_TOP_RIGHT, 0, 0);
    lv_obj_set_style_bg_color(btn2, lv_color_make(0x00, 0xDD, 0x00), LV_PART_MAIN);
    while(1)
    {
        lv_obj_set_size(btn1, 400, 400);
        sleep(3);

        lv_obj_set_size(btn1, 200, 200);
        sleep(3);
    }

The picture should switch between


But if i cancel the direct_mode in win32drv.c:

    static lv_disp_drv_t display_driver;
    lv_disp_drv_init(&display_driver);
    display_driver.hor_res = hor_res;
    display_driver.ver_res = ver_res;
    display_driver.flush_cb = lv_win32_display_driver_flush_callback;
    display_driver.draw_buf = &display_buffer;
    //display_driver.direct_mode = 1;
    g_display = lv_disp_drv_register(&display_driver);
    lv_timer_del(g_display->refr_timer);
    g_display->refr_timer = NULL;
    lv_timer_create(lv_win32_display_refresh_handler, 0, NULL);

Something strange happens:
The picture is normal at the beginning, but then it will switch between the images below,why imust use direct_mode?