This issue has been discussed many times on this forum, you may want to use the query function in order to avoid redundant discussions.
Here is a (random) pick: Issue with uart RX data when sharing with multiple tasks - Kernel - FreeRTOS Community Forums