The decision is purely based on the size of the project and the availability of resources and skills. If the project is small, it is better to do it in-house. However, there are higher chances of success if more resources are allocated to a large-sized project. Apparently, outsourcing works well if there is a shortage of resources or required skills. On the contrary, it also can become difficult to co-ordinate in case of interaction design that is tightly integrated with the application process, requiring too many meetings between engineers, product managers, and designers.
The best way to decide whether to outsource the UI/UX design or do it in-house is to understand the size of the project, skills required, and required coordination efforts.