The Alchemy of Letting go by Amber Morrell
A young scientist finds a magical way to escape death, but can't escape her emotions.
Twelve-year-old Juniper Edwards can’t stop chasing the endangered butterfly her sister died trying to catch. In her grief, Juniper finds comfort in her family’s study of insects, because science is based on logic, order, and control. But then Juniper’s search for the butterfly nearly kills her, too, and when she wakes up with newfound abilities, she discovers that the line between science and magic―and life and death―is not as solid as she thought. With the help of her mysterious neighbors, Juniper tries an experiment to change things back to the way they were. Its result will force her to face the fact that some things are way beyond her control.