Personally, I think that the system sometimes behaves wonky in a sense that it can be unpredictable whether your guys actually ''switch'' positions on the fly as you have described. Sometimes the game works in your favor, sometimes it doesnt switch the player at all, and sometimes it has a tendency to play your backup PG as a C ....
However, what you can control is the instruction you give to your coach... I usually go with a "Strict lineup'' option, so that my players actually play the positions you assign them to (For the most part lol).In your case, I would chose the ''let the coach decide after lineup'' (my game isnt set up in English, sorry if I get the translation wrong), so that the AI has more leeway to shift players inbetween positions.
Stamina can be a factor too: Despite poor Stamina (1-4), players tend to have varying minutes played until they get switched out. Ofc, generally speaking, the higher the stamina, and the less foul prone the player is, the more likely it is that he will play 40+ minutes even with rotation players being in the backup slot. And once again, this also varies whether you d like your players to continue playing even after an early foul trouble or if you banish them to the bench...
Some users here can give you better insights into this topic and might give you better explanations to the spaghetti code :) Personally, I think that the ''inbetween'' position switches have become more unpredictable in the last 2-3 seasons, but take this with a grain of salt.