When disconnects like this happen, it's usually one of two things -
1. A faulty or low quality USB cable from the controller to XIM APEX.
2. Insufficient power from the console to supply a Titan Two, XIM APEX, mouse, keyboard and controller.
The solution is to use high-quality USB cables (e.g. Titan Connection Kit) and add a power adapter to either the Titan Two (preferable) or XIM APEX USB hub.
Another couple of things to check are that you have Communication Method > Use USB cable enabled on PS4 (refer to
https://xim.tech/start/), and that your controller is fully charged before connecting to XIM APEX.