Fortunately, since bitcoin isn't fungible, if the coins were kept as separate utxos you can prove you sold the 2nd Bitcoin.
The IRS probably assumes first in first out, curious if anyone has put this to the test.
And you're just wrong about Lightning Network.