This reverts 619acd58ca55b2a85cf70d0f7861e3c98058972d and re-lands 6cfa7fcad64e2fe70bca01cfbc4598ecd24613b1. The 6cfa7fcad64e2fe70bca01cfbc4598ecd24613b1 was good. The screenshot changes were expected.
Fixes https://github.com/flutter/flutter/issues/32215