Hello,
.detach() is safe but .data is not.
Autograd engine will detect on .detach() options but will not pay attention to .data, so if  variable is needed in backward() pass, change variable value and will get incorrect answer and there will not any error raised.