From my understanding, the main advantage of writing by hand in terms of memorization/understanding comes from the fact that writing just takes more time. I am not aware of any research that would show that writing is more effective than engaging with text for the same amount of time in a different way, like typing it and then re-reading.