After changing to new screen, the screen is not completely updated

Hi,

The project that I am working on consists of multiple screens, I am having issues when the screen is changing, it seems some of the parts of the previous screen are not deleted properly or the screen is not totally updated. The project is running on ESP32-S3 and using LVGL v8.2. I have an initialization function for each screen, which include the parent screen object and multiple child objects, when the screen is changed the new screen is initiated, then loaded and the previous screen is deleted. The issue occurs not always but often.

Here is the snippet from changing screen part.

 ui_next_screen_init();
 lv_scr_load(ui_next_screen);        
 lv_obj_del(ui_previous_screen);

Here is the LVGL handler task

 if (pdPASS != xTaskCreate(
                      (TaskFunction_t)lv_handler_task,
                      (const char *const)"lv_handler_task",
                      (const uint32_t)4 * 1024,
                      (void *const)NULL,
                      (UBaseType_t)configMAX_PRIORITIES - 1,
                      (TaskHandle_t *const)NULL))
    {
        ESP_LOGE(TAG, "lv_handler_task error no memory");
    }
void lv_handler_task(void *arg)
{
    while (1)
    {
        vTaskDelay((10) / portTICK_PERIOD_MS);
        lv_task_handler();
    }
}

screen with issue


screen without issue