If two transactions has the same gas fees, base gas fees, max priority fees, (aka gas fees config) which transaction will come first in the same block?
Regardless of any fees, it's up to the miners to decide (as long as the fee meets some minimum requirements). So a miner can choose to include whichever transaction wherever in a block.
However, in reality the miner should choose the transaction which give him the best rewards - that is, the transactions with the highest fees. And that's what usually happens. If there are multiple transactions with the same fees, anything can happen. With a rational (one who wants to maximize their profit) miner, probably the first seen transaction gets included first and the second right after that.