Gillis only subbing for Flagg would be a mistake.
Looking at Miya's best lineups with at least 150 offensive possessions, there are two players who appear to make the others play their best: Gillis and Sion.
- Kon does best with Mason, Sion, and Tyrese.
- Tyrese does best with Sion, Mason and Kon.
- Khaman does best with Sion, Mason, and Flagg.
- Flagg does best with Sion, Khaman, and Kon.
Sion for sure should play a ton, but Mason needs more than (40 - Flagg's minutes). But you're correct that many of the top lineups don't include those two. The only high-possession lineup that I can find that has both Mason and Flagg includes Brown & Kon. That's it. So if we're considering substitution patterns and want all the yummies the other players get from playing with Mason and Sion while also keeping our best player in the lineup, that's Flagg, Kon, Gillis, Brown, and Sion/Tyrese. Play that lineup for 10m, sub Gillis for Flagg for 8m, and you're at Gillis with ~ 18m, which feels about right.