Which factors are considered for a transaction to be of higher priority so as to be confirmed in the next block or be closer from the tip if all the transactions in the mempool were of the same free rate, say all were at 1 sat/byte at a given time?
There used to be a concept called transaction priority. It was based on the following formula:
sum(input_value_in_base_units * input_age)/transaction_size_in_bytes
input_age was how many confirmations the input to the transaction had, so coins which had not been moved in a long time had priority over coins which were being moved around frequently. Transactions which moved larger quantities of bitcoin were higher priority, and transactions which were smaller in terms of bytes were higher priority.
This has all since been removed, though, and so is no longer relevant. Miners and pools will now decide for themselves which transactions to prioritize.