LVGL’s tasks are not threads in the OS sense; they are just periodic timers that are fired by lv_task_handler (which was renamed to lv_timer_handler in v8 to address the confusion). To get the behavior you’re looking for, you would need to use a proper OS and mutexes.
Alternatively, you need to restructure your application logic so that it fits the model of periodic processing in timers that LVGL uses.