Terminate and trade, Pittsburgh and Florida. Karlsson agrees to terminate his contract. He signs a Tanev special in Florida where they circumvent the U35 contract rules because he is a hair below qualifying for them. After Karlsson signs in Florida, Florida trades Pittsburgh a roster player with cap+term and picks+prospects for another roster play with less cap and a few random C prospects.
Karlsson is owed about 21.5M over 2.5 seasons. Add in the Florida tax discount, and if he signs for about 4.5M x 5 years with the lowest possible salary prorated in 2024-2025, it is unlikely he will leave any career earnings on the table. Especially since he will be 37 at the end of his current Pittsburgh contract and possibly looking at retirement. In 2-3 years, he goes on LTIR, which with his injury history shouldn't be a problem.
To me, this seems no different in theory then a sign-and-trade - but of course it might not be allowed.