Adding a button press to void loop with other while conditions

The main thing to make code responsive all the time is to use only one loop.
And this loop is

void loop() itself

all looping is done by void loop
and all other things are done baised on loop() - looping

I assume that you wanted to keep the main-structure of the given code and add the button-press detecting. It can be done but it will be more complicated than learning
what I call most-outer-global-looping.

A for-loop or a while-loop does inside-local-looping. Which is the opposite of most-outer-global-looping

See this more graphical explanation

best regards Stefan