My phone started to run out of space recently. Turns out that I had a lot of photos on it taking up space. When I deleted them, I noticed that the photos would disappear from Google Drive too – not exactly what I wanted. Happens to be a way to remove the photos only from the phone without affecting Drive: