Conditionals in your code will not wait until they are fulfilled. If they aren't evaluating to true, they're skipped and never checked again unless you explicitly re-check (by running that code again). Your code executes within the scope of a single moment in time. Abandon any notion of any type of construct that roughly translates to "wait until" - there is no "wait until" (e.g. image_index is 7) outside of repeating loops that stall execution until their condition is true. Your code is merely "if colliding, up was pressed and image_index is exactly 7 at this point in time".
The Animation End event is the way to go here, as this will fire when an instance's animation has just ended, and presumably you want something to happen once that is the case.