You would have to disable photo syncing on your iPhone.
Keep your photos safely stored and up to date on all of your devices - iCloud Photo Library - https://support.apple.com/HT201313
Beware:
Delete photos on your iPhone, iPad, and iPod touch - https://support.apple.com/HT205856
- "When you use iCloud Photos and delete a photo or video on one device, it's also deleted on all other devices where you're signed in with the same Apple ID."
- "If you accidentally delete a photo or video, you have 30 days to get it back from your Recently Deleted album.