Deleting / replacing images

Is there some trick I don’t know about. Every once in a while, I choose the wrong image for a post, don’t realize it and click upload. I then select it within the post, hit delete and the image appears to be gone from the post. When I actually post, it reappears. Same thing with edits.