You can reduce the chances of it happening by not hitting 'Go To Track' too soon as the lobby transitions/loads.
For example: you join a lobby, a race is in progress, the race finishes and you click Go To Track - there is a short period where people in the lobby can select to go to track before the lobby has finished resetting players from the last race back to the pits - in my experience this is when your issue is most likely to happen.
Instead, wait until you see all player's post-race messages and their cars reset back into pit lane before you select to Go To Track.
Since being mindful of this I haven't encountered the issue.
If you do get it, just leave the track and re-enter.