Your network connection to the internet either might not work so well for your console or because of the internet itself or vice versa for your friends. Might want to make sure your PS4 subscription is still active as well as your system is set on the right settings ect to recieve internet on it and that theres no poor connection on both ends for you and your friend. If it aint this it might be possible your internet speed might not be as high as well. Sometimes more often then not I get kicked off as well on my console and I think my internet is only running a standard speed for my otherwise standard service so Im more then likely losing connection for that reason at times. Sometimes oftenly its caused by lag in game and sometimes in the midst of playing I often go grab food and run the microwave and it will forcibly make my internet go offline due to wave frequencies the microwave throws off (yes its a thing I seen it mentioned online and it happens to me still to this day) depending on where you play also maybe there isnt much signal feedback going on in the current room. I kind of keep my WiFi box a bit closer to my PS4 for that reason. Hopefully the solution is fixed for you soon and am sorry to hear your going through the trouble of network errors it is a pain to deal with.