2021 champion Aryna Sabalenka reached the quarter-finals of the Madrid Open after defeating Mirra Andreeva.