Problems with dynamic page

I’m trying to create a macro that can select and buy items from a page, I already made it work, but i found a singular problem.
The page tends not to refresh entirely but to update or just remove items that have been take, this cause the macro to click over an item that no longer exists when conditions are met and take a different item that i don’t want to take. I tried to fix this by adding an extra check before clicking but still it doesn’t work
I’m not sure if it can be done with the macro but is there any way to just not let the page to update its elements or any other idea?