Can't see clearly from the photo, but to avoid splashing the grating would normally have holes cut for each pipe, and end of pipe would go couple of centimetres below the grate.
The grate is to stop leaves entering, it is not supposed to impede the flow of water to the drain by being across end of pipe. To do job properly the screws in the pipe brackets to wall would have to be undone to provide sufficient flex in pipe to get it through.
If the pipes are cut off above the grate, dirty water will seap across the patio. The solution then is to buy a drain pipe joiner (it is a coupler with one half bigger than pipe, other half smaller) idea being that as water flows downwards each part directs flow inside the pipe. Photo suggests water is running onto patio
There is another solution, a concrete anti-splash rail, like sides of a box that cements in, some a U shaped and wall forms 4th side.
Mixing gutter downflow and waste pipes in same gully was a bodge, should really have had pipes connecting into biggest with bits like this (where the extra pipes join the side fittings)
Order online at Screwfix.com. Lightweight Access Pipe manufactured from uPVC for strength and durability. Easy to work with and suitable for high temperature waste discharges. Access pipe enables testing and maintenance of the soil system. The use of silicone lubricant on all seals will...
www.screwfix.com
or a separate underground spur with connectors like this (although these are for where the drain comes up through floor inside, not outside)
Solvent Waste Connection 110mm Waste Adaptor with 32mm x 40mm MuPVC from Brett Martin. (B4701). Order Helpline ☎ 01752 692 221
www.drainagesuperstore.co.uk
Illustrations are for clarity, not recommendation of supplier