The answer to this question is what defines the particular test
But how do we define what is more extreme?
This choice is really the essence of what defines the particular hypothesis test under use. Indeed, a classical hypothesis test can be reduced to a specification of a total order $\preceq$ on the set of possible outcomes for the observable data. This total order, which I will call an evidential ordering, defines an ordering of which observable outcomes are more conducive to the null hypothesis and which are more conducive to the alternative hypothesis (i.e., "more extreme").
Suppose we have an observable data vector $\mathbf{x} \in \mathscr{X}$ from a model $f_\theta$ and we define hypotheses $H_0: \theta \in \Theta_0$ and $H_A: \theta \in \Theta_A$. Now suppose we choose an evidential ordering $\preceq$ on the set $\mathscr{X}$, where larger values in the ordering are regarded as being more conducive to the alternative hypothesis. Then we can define the p-value function for the corresponding hypothesis test as:
$$p(\mathbf{x}) = \sup_{\theta \in \Theta_0} \mathbb{P}( \mathbf{x} \in \mathcal{H}_A(\mathbf{x}) | \theta)
\quad \quad \quad
\mathcal{H}_A(\mathbf{x}) \equiv\{ \mathbf{x}' \in \mathscr{X} | \mathbf{x} \preceq \mathbf{x}' \}.$$
Since the hypothesis test is fully defined by its p-value function, and since this function is fully determined by the evidential ordering, the evidential ordering fully defines the test. Two hypothesis tests are equivalent if they use the same total order $\preceq$ (e.g., the T-test and F-test in a linear regression are equivalent if there is only one explanatory variable). In practice, the evidential ordering is usually defined only implicitly through the formation of a test statistic $T:\mathscr{X} \rightarrow \mathbb{R}$ and a specification of an ordering on $\mathbb{R}$. Nevertheless, the test statistic is really just a mechanism to define the underlying evidential ordering, and two different specifications of test statistics that lead to the same evidential ordering essentially define the same test. (You can find more discussion of the mathematical structure of a hypothesis test in this related answer.)
Now, we can make different choices of the evidential ordering and this defines different hypothesis tests. We can then explore the properties of those tests ---e.g., their power function, etc.--- to see which orderings lead to tests with good properties. Finding a good ordering that yields good properties for the test is an art form in itself, but the general idea is that we usually try to form a statistic that tends to be "small" when the null hypothesis is true, and gets larger the further we depart into the alternative hypothesis. The likelihood-ratio statistic you use in your question is a statistic that has this property, but there are others as well. As to how to generalise the likelihood ratio statistic to composite hypotheses, the usual generalisation is:
$$R(\mathbf{x}) = \frac{\sup_{\theta \in \Theta_A} f_\theta(\mathbf{x})}{\sup_{\theta \in \Theta_0} f_\theta(\mathbf{x})}.$$
As you can see, this statistic defines "extremeness" by looking at the constrained maximised likelihood within each composite hypothesis. Other generalisations are of course possible, and it is open to you to formulate an alternative test statistic leading to a different test (through a different evidentiary ordering).
Trying to clear up your confusion: From what you have written in your question, I think this issue here is a failure to understand why we use "two-sided" hypothesis tests (or statistics like the LR statistic) that count unlikely deviations in any direction as being conducive to the alternative hypothesis. The reason for this is that we are usually a priori ignorant of the likely direction in which extreme deviations might occur. If we first observe the data and then see which tail it is in, and then choose a "one-sided" alternative in that direction, we are essentially altering the evidential ordering after seeing the data. This induces serious confirmatory bias in the test, since the alternative hypothesis is formulated after seeing the data in a way that treats deviations in the observed direction to be conducive to the alternative.
For example, if we have a symmetric distribution and we use a post hoc one-sided test, we essentially halve the p-value (it is now uniformly distributed between zero and a half). This imposes serious confirmatory bias, and it means that the stipulated size of the test is actually only half the true size.