The suggestion is simple: I think that the order of priorities should be changed to establish the positions and that in the event of a tie in points, it should first be defined by "Goal difference in matches between tied teams" and then by "Goal difference in the competition"... it seems to me that this avoids the problem of teams leaving a league at any time (which is their right) or cup classification by random wins against smaller or abandoned teams.
An example: teams A, B and Z. In the first leg, A beats Z by 15 goals and B by 2 (partial difference of +17 and first with 6 points) and B beats Z by 20 (+18 remains and second with 3 points) In the return matches, the 2 beat Z but B beat A by 1 goal.
A and B finish with 9 points but B is first by better difference. On the other hand, if the difference between them is taken into account first, A has +1 and he would be the first.