In the last two minutes of a game, your coach can override your instructions in some circonstances. This is known and intended. Sadly, people have repeated wrongly in the forums that there was a way to obtain 48 mns every time when it is not the case. Please, spread the information so that users don't get frustrated anymore confused with the happening.
If my voice is not credible, jbmcrock is a multiple winner of B3 with BC Törööö :
(26712.145).
I will elaborate that it is not about having 7, 8 or 9 players selected. Your trainee is a young center playing at PG, his skills don't suit the position, the coach may sub him if there is a better option in the selected team. Even with only 5 players, the coach may decide to switch your trainee with another player in the final minutes. Unfortunately, it adds to the hassle of training well-rounded players and is a big pain but it has always worked this way.
He has lost only 2 mns of training, no biggie, it makes little difference. When he gets better for the position, it won't happen as much.
In the meantime, if you want to reduce the odds of this kind of sub, you shouldn't have any suitable player to replace your trainee in your lineup. Though, in a competitive game you want to win, it's a risk if he fouls out or get injured. This is the intended trade-off, it is meant to be hard to train and get results at the same time.