in reply to Re^2: Expect and PTY dropping data
in thread Expect and PTY dropping data

This sounds like an operating system bug.

If it is indeed, you shouldn't even think about fixing it on the perl level. Write a bug report against the OS instead.