Does the code on an ATTiny execute while it is being programmed by ISP?
The ATTiny, and every other IC I'm aware of, can only be programmed while it's held in the reset state. As such, any ICSP device must assert the RESET line for the entire duration of the programming process.

So no, your program will stop running before programming begins, since the programmer will hold reset low.