If all transactions are broadcast to all nodes, and all nodes are mining these transactions into blocks. When a block is created and the block is broadcast to all nodes, it may contain transactions that other nodes are currently trying to put into their blocks.....what happens in this scenario?
Not all blocks are mining the same transactions in their respective proofs-of-work. Each miner collects enough transactions via gossip until they reach the block size limit. Not all transactions will make it into a certain block, so those will be more likely candidates to make it into the next block. Miners decide which transactions to include in a block with the following equation:
priority = sum(input_value_in_base_units * input_age)/size_in_bytes