In the phone default configuration, WIFI priority is higher than the data traffic, which is from the perspective of customer service to save money,
WIFI is free most of the time, and data traffic is never free time, So whether the operating system or mobile APP in the WIFI and data traffic are turned on at the same time will give priority to the use of WIFI without the use of data traffic
Edit: Some Samsung phones offer that functionality as a way to gain download speed (preferably on an Unlimited data plan)
There is also a 3rd party option called Speedify. But is not free.