I have been thinking about something that sounds like a pipe dream based on the Cook PVI. But it doesn't look like it when you see that Jon Tester is a Democrat representing Montana in a federal office. Because Steve Bullock looks like he has a shot because of the deviation of presidential and senate races, if he wins, does that mean the state "turned blue" because Congress is a federal office?
There is no legal definition of blue or red so no.
Blue and Red is a way to discuss what states are likely to go for one party's candidate or another. It usually refers to presidential politics. It comes out of graphics on television (or now the internet). To show a graphic of how each state voted, each candidate gets a color. It used to be that some networks had it reversed, but now red = Republican and blue = Democrat.
The other thing is that local politics can be different from the president. Even though it is a federal office, the senator from Montana is still a statewide Montana election. A Democrat from Montana may be more conservative in general or on specific issues than the majority leader from New York. Even though presidential elections are by state (mostly), the candidates are national candidates.
Add to that that individual presidential elections have vagaries based on who the candidate is. In 1984, all but one state and D.C. voted for Reagan. They did not all became red states though, just for that election. In 1988 there was more spread.
States do change though, based on demographic shifts, changes in attitude and priorities, and shifts in parties that may seem small but for a given state hit one issue that is important to them. West Virgina switched from blue to red. Other states have drifted from reliably red to in play.
So, for Montana:
If multiple reliable polls showed a close race between Trump and Biden, then news organizations might identify it as "in play" and perhaps color it purple this year.
After the election is in, if Biden were to win Montana, it would be on a graphic of results as blue.
But in 2024, unless there is sustained apparent propensity to vote for DEM, it would still be considered red. Maybe "in play" if opinion polls suggested that was the case.
Keep in mind- this only matters to people who are planning how to spend campaign time and money, and then afterward to people who are analyzing the aftermath. And also to news and information people trying to present or prognosticate. Red, blue, purple, or orange: If Trump wins the election in Montana, he gets their electoral votes. Ditto Biden. If Bullock wins, they have a DEM Senator, specifically Mr. Bullock. If not they have a GOP senator, specifically whoever. Etc.
A state being "red" or "blue" is a journalistic shorthand, there is no constitutional, legal or official definition.
Generally when a journalist says "X is a red state" they mean that it is expected that they will return a Republican in the next (or in a generic) Presidential Election. It is well known that otherwise "Red" states can sometimes have Democrat as senator or governor (eg Jon Tester, or Doug Jones in Alabama), or "blue" states can have a republican (think of Arnold Schwarzenegger). This doesn't make Montana or Alabama a "purple" state, Montana is expected (with 97% probability) to vote for Trump in the Economist's model
Therefore, most commentators would say that Montana remains a "red" state.