Politicians absolutely have a business commenting on trials. Whether local or federal, it's going to happen because it's 'of the public interest', and people will wonder what side that person would have taken in the case. As if it'd help give insight to the character of that politician.
If people use said comments to make excuses for X reaction, that's on the idiots who do so, not the politician.
That's what some would have society believe (mostly the right, unless it goes against right narratives).
Personally, I can see the good and bad of it and overall, politically speaking, you're opening yourself up to a clusterfuck of issues if you go beyond a middle road narrative.
Biden's message, for example, was typical. "I feel different but the jury has spoken, we've offered to help" and that's it.
Harris, if she took it beyond that middle road, is risking a lot by doing so.
That being said, she's also a citizen and has a right to her own opinions and voicing that; free speech and all.