Imagine if you had done something really bad in the past which had caused you suffering in the present. You really want to go back in time and change it. Unfortunately, at the moment, it's impossible to "physically" or "scientifically" go back in time. However, imagine if you took a drug. This drug put you in a coma/deep sleep, in which you dreamed for the rest of your actual life (until you died in the coma in real life). This dream allows you to time travel back into the past, so you start a day or two before your big mistake, so you avoid doing it. This happens provided the person does not make any other mistakes or cause the future to be a disaster, so going back in time has no negative implication on the people around you. In this sense, you are mentally travelling back in time under the influence of a drug. It feels completely real and is the exact same as real life, except in "real life" you're asleep in a coma. The question is, is this drug-fueled simulation the same as travelling back in time in "reality" or "physically" or "scientifically" travelling back in time? This also then brings up the question, what matters more: reality, or our interpretation of it?
The question is, is this drug-fueled simulation the same as traveling back in time in "reality" or "physically" or "scientifically" travelling back in time?
No it is not the same. Reality has to be a shared experience for it to be "real".
Even those who consider that "it is all in the mind" and "there is no such thing as an external reality, only our thoughts count", such as Berkeley with his subjective idealism, conceded that experiences and sensations have to be shared by multiple agents for them to be somehow real.
Berkeley held, that even though we were all nothing but thoughts and sensations, and there was no external material world, the whole was held together by the mind of God (he was a christian bishop after all), and that's why different people can share the same subjective experience to some extent.
Similarly in the matrix movies, even though everyone is living a complex illusion, their virtual world is held together by the Matrix AI software, and that's why they have a shared reality.
In you case on the other hand, you clearly state that only the person who takes the drug experiences this time travel. All the people around him go on with their lives, and seen from their point of view, he is nothing but a body in a coma. His experiences are not shared by the rest of us, so they are not "real" in any sense.
The only way his experience can qualify as real is if you subscribe to some sort of solipsism. You can look up the problem of other minds for more on that point of view. But in your initial formulation of the problem, you implied that other minds do exist, since the person can be observed by other people.
This also then brings up the question, what matters more: reality, or our interpretation of it?
For this question, you should look up the topic of realism vs anti-realism. There's far too much to cover in one SE answer.
The time-travel aspect isn't really central to your question. You're really asking if a perfect mental simulation of reality is the same as physical reality. That, in turn, is way of approaching one of the biggest arguments in philosophy, idealism vs material realism. The question of whether mental representations or physical objects are more fundamental is a debate that goes back at least as far as Plato (idealist) and Aristotle (realist).
It was the central topic in Descartes' Meditations and is most familiar in recent popular culture as the theme of the seminal science fantasy movie The Matrix, which replaces a purely mental simulation with a computer generated one.
Material realism has been dominant in the world of philosophy for quite a long time now, but there's reason to believe some variant of idealism might be due for a comeback, particular with the recent burst of interest in computer generated "realities" (see my essay on that topic here).