So I covered some of that along with many “little mysteries” in a course 17 recently (slides 28-35). From the summary slide:
There are two main situations where inplace operations cannot be used:

When operating on leaf tensors, the leaf tensor would be moved into the graph, which would be bad.
When the operation before the inplace wants to have its result to compute the
backward. Whether this is the case is not easy to tell from the outside,
unfortunately.

You are in the second case. What happens is that exp wants its output to compute the backward (which multiplies by the output) while e.g. log wants its input (because the backward divides by the input). This is the “not always easy to tell from the outside part”.
If you do x = x + 0 you are creating a new tensor (which happens to be numerically identical to the old x) and then assign that to x and modify it inplace, but exp finds its output unmodified. This is, btw. the purpose of the ctx.save_for_backward(...), ctx.saved_tensors exrcise in autograd.Functions.
PDF of the slides (and Jupyter Notebook to run the code) are on github 21, but apparently not enough interest for video.
Of course, the authoritative in-depth reference is @ptrblck’s  and my imaginary book from which I made the slides for the talk.
Best regards
Thomas