Running multiple dnf {install/upgrade/swap/etc} commands with the --offline option is not a solution, as you might have already experienced, since upon running the second command (without rebooting), the first one will be canceled:
There is already an offline transaction queued, initiated by the following command:
dnf swap mesa-va-drivers mesa-va-drivers-freeworld --offline
Continuing will cancel the old offline transaction and replace it with this one.
It seems that dnf only accepts one offline transaction at a time. Stacking offline transactions would make sense though.
For the sake of correctness (here and in the reported issue), you might want to update the 2nd example, which seems to be missing an operator between the two sudo dnf swap commands.