I re-watched the onboards - of Verstappen, Tsunoda, Hamilton, Perez, and Bottas, who were driving in that order on that lap.
Tsunoda goes off track
to make space for Hamilton at turn 8/9
You can see a board in the distance, but that is a blue flag shown, as evidenced by this picture, where even before Tsunoda leaves the track, the board is shown for him. In any case the yellow flag is more clear and a diagonal half of the board.
By the time the actual yellow flags are shown, Hamilton has already left the scene and is steaming towards 11/12/13 and passing Verstappen. The yellow flag is first shown for Perez on a board at turn 8, which he sees on his left hand side just after turning from 7 to 8.
Subsequently, Bottas comes up to Perez, and just before he is about to pass him in the same 7/8/9/10 complex, a single-waved flag is shown on the same board.
Tsunoda going off track for Hamilton:
Blue flag still being shown for Tsunoda as Hamilton passes him:
Here A flag is shown, but Hamilton passes it so fast, from the onboard it is not clear if it's yellow, single-waved, or double-waved, it's just not clear AT ALL.
Another frame
In any case, the yellow flag was shown for an off-track incident that happened a mere milisecond before Hamilton passes Tsunoda. Once Tsunoda is actually off-track, Hamilton is already well clear of the incident scene.
Any penalty for this would be absolutely ridiculous.