Before being included in a block, transactions can be removed from the mempool. This is done through transaction validation and mempool management, which ensure that only valid and prioritized transactions are included in the blockchain.