So the best way to tackle this is to go in on the inside by making a hole in the lining seam by unpicking it a bit.
So the space you make in the side doesn't have to be very big, just big enough to get your hand inside and manipulate the fabric. I chose to remove the labels at this point also.
Once you have your opening place the pocket to be repaired under
the machine making sure you can feel the gap is stretched open underneath so you are not catching it, I chose to just topstitch down the side that had come away. When you get so far you will have to lift the zip and move it behind before continuing stitching.
Now when you have finished close the original side seam, I continued in pink cotton but you could change to an exact colour match if it would bother you.
A bit of pink stitching doesn't bother me, also I don't like wasting the thread on the bobbin.
Here it is finished, now I just need to get a can of that spray on waterproof as this jacket lost it's waterproof properties a while ago, it's ok unless it really rains heavy which it has done a few times.
If you are repairing a side seam you can go in exactly the same way but obviously it's easier to open the lining seam closest to the one that is damaged. Then you would pull the side seam of the outer jacket through the hole and repair on the wrong side, then close the lining seam as above.