There's no impropriety about sending a convicted felon to prison just before an election. He has already been convicted. The fact that he is the nominee is irrelevant. RNC should have thought about that before they picked a guy they knew would likely end up behind bars for all the criminal acts he committed.
Now Trump will say he "won" the case, just like he did with the classified documents case. Corrupt judges all the way down.
To be fair, would you want to be the judge that threw him in jail when the military comes to break him out following an election victory? Looking into America from the outside, people are hedging their bets with possible dictatorship.