Anyone using a non-Pixel device like a OnePlus phone and Google Photos in conjunction probably knows that this can lead to some annoying issues. When you delete a photo in the camera right after taking it, it's possible that Google still uploads it, making you repeat the deletion process in Photos. The solution is simple on recent OnePlus phones: Just disable the pre-installed Gallery. The camera will then preview your shots right in Google Photos, and the app will respect deleted images right away.
To deactivate the Gallery, look for it on your homescreen or in your drawer and long-press it to open the pop-up with the "App info" shortcut. Head there, and you'll see an option to disable the app. The phone will warn you that "Android and other apps may no longer function as intended" because it's a pre-installed application that you can't uninstall. You still shouldn't run into major problems when you deactivate it, but beware that you'll also lose the screenshot editing tool for cropping, editing, and annotating your screenies. Your images are safely stored on your phone and Google Photos servers; deactivating the Gallery won't make you lose them.
Once you've deactivated the Gallery, start up the camera and snap a picture. When you tap the preview button in the bottom right corner, you'll notice that the interface has changed, as the UI is now provided by Google Photos rather than the Gallery app. When you delete an image here, it'll also vanish from the Google Photos servers. There are some more advantages. You can instantly cast photos to your TV or smart display via the interface, edit a picture and save changes right to Photos, and share images with other Photos users. Other than that, functionality remains the same. You can instantly return to the camera via the shortcut in the top left corner or via the back gesture/button.
Left: Regular Gallery integration. Middle & Right: Google Photos and its new editor.
Be aware that this doesn't go as expected for all OnePlus phones. We can confirm that it works on the brand-new OnePlus 8T on Android 11 and the OnePlus Nord on Android 10, but when we tried this workflow on a OnePlus 6 and a OnePlus 7, we still got the regular image viewer. Only tapping the edit button would take us to the Google Photos editor here. Since these phones are stuck on an older version of the Camera app, it's possible that their software simply isn't ready for this workaround yet. It looks like you need version 4 or higher to get the Google Photos UI, though some people using the OnePlus 7 Pro report that it's functional starting with version 3.10.26, the latest 3.10.x beta release. In any case, your mileage may vary.
The trick might works for other phones as well, but so far, we've only tested it on OnePlus devices. If you want to try it with a handset from another manufacturer, be extra careful that you don't lose any data and make sure that you've backed up everything.
Updated to clarify that the workaround is only available for phones running recent versions of the Camera app and that deactivating the Gallery will disable OnePlus' screenshot editing tool.