Wait before rolling it over, probably at least 30 days. If you do it immediately it is considered a single transaction and illegal. If audited they’ll make you reclassify it and pay penalties.
The point of waiting e.g. 30 days is EXACTLY that it exposes you to gains/losses and you can rightly say the two actions are no longer connected.