As I discovered when looking at this issue in 2016, players are more conservative defensively when they get in foul trouble, so expecting coaches to ignore the situation is unrealistic if they are doing their jobs right.
Furthermore, there are reasons you’d rather have a player available for the end of a potentially close game than just simply playing him until he fouls out. On the flip side, a player whose effectiveness is reduced due to foul trouble might still be better than the alternatives and if that player isn’t particularly foul-prone to begin with, there’s little need to bench him. Naturally, each coach handles these decisions differently. (And because this issue doesn’t seem to be well-understood, I suspect many are using a sub-optimal approach.)
...
[2-Foul Participation] was around 20% for all of big-time college basketball last season, a number that has been dropping steadily since 2010, the first season for which we have complete play-by-play data. Coaches are gradually getting more conservative about playing guys with foul trouble in the first half. Even with foul rates declining to historic lows last season, coaches were less willing to play a guy after he picked up his second foul. It makes one wonder if there is a level of fouling low enough to make coaches reconsider their philosophy.