I am not sure my answer is correct (I guess it is inaccurate in some parts) but let's give me this post to discuss. I can learn more from my inaccurate understandings.
I guess if two waiting transactions have same size, same mining fee (not fee rate), the older will be chosen to be confirmed first by miners, according to
[1]Formula
priority = sum(input_value_in_base_units * input_age)/size_in_bytes
In fact, it can be more complex than such. How many transactions will be confirmed in one block of bitcoin.
You can imagine when fee rates on the network drops to 2 sat/(v)byte, ie. and all waiting transactions with that fee rate are totally fitted in size (and max number of transactions) of one block, they all will be confirmed at the same time. In rare cases, the tip of mempool (1 MB) is cut at exactly transaction A, while transaction B with same fee rate, same size, same mining fee so B will be confirmed in the next one block. Of course, if same fee rate will be used in next one block.
[1] https://en.bitcoin.it/wiki/Miner_fees#Priority_transactionsThe first time my transaction is included in the block and hashed by the miners I get a confirmation. What does the second confirmation mean? And the third and so on?