Step one:
Unistall Apex.
Step two:
Play something else.
In all seriousness console player here and the Code:anything errors are still around a year after launch and all of the tech assistance aside they have not been fixed.
Moderators and support will come on and give you some basic troubleshooting guides. In the end it is really not on your side unless you have some truly horrendous hardware and bad internet.
If you look up code:leaf in tech issues you will find a ton of settings and whatnot that you can adjust on your router. And there are ports you can trigger and forward to better sync with the servers. It may or may not help, honestly I have seen wave after wave of disconnects since mid season 1 and here we are at the start of season 4 and there is a new one introduced at the end of season 3. Internal server error.
I wrote elsewhere thee were so bad in mid December I went and bought a new PS4 pro thinking my console was just getting old. Nope second game in same error.
They will probably fix it at some point. Code:leaf,wheel,shoe etc have seemed to diminish in frequency, so there is hope.