When we try to draw cutout on text field borders, we draw the stroke on a bitmap first. However if the text field is too large, the bitmap size will be too large and cannot be drawn back to the real canvas, which causes crashes.
Adds a workaround/fallback solution to avoid the crash.
PiperOrigin-RevId: 410523013