So it's untrue that you're working on the same block until you find it since you need the name of the last found block header to get a valid new block to add to the chain.
Thats why if somemone solve it before you, you get an orphan...
Minor correction, orphans occur when a block is solved almost simultaneously and submitted between two miners. The next block solved AFTER the simultaneous submission determines which block gets orphaned.