I know this sounds logical, but it is missing key elements that are crucial to evaluating future courses of action:
2028 is three years from now. In baseball, that is a very long period of time. Assuming 2025 Lopez/Ryan is a 1:1 swap in 2028 is dangerous. To show but a few examples....at this time three years ago Jose Miranda, Gio Urshela, and Nick Gordon were all at an OPS+ over 110. Devin Smeltzer was a 105 ERA+.
Tyler Duffey was still a thing.
When you make the decision to deal 2025 Joe Ryan to help your 2028 team, you have to bake in the reality that A) Joe Ryan may not even be a Twin at that point or B) May not be nearly the same player.
None of that is to say we should deal Ryan or Lopez. Or that we are on a fast track to 2028, but just to point out that some of this is a bit spurious in presentation.