Theory. They are the same person to the core. It is just that the drugs, likely a combination of them, caused similar event, as we have seen in other isekai, where getting hit on the head or experiencing near death event causes memories from the previous life to resurface.
She was never transmigrated into this body, she was born as her, and the only shift is that somehow the drugs got washed out and she regained memories that should have been sealed away.