Per https://beam.apache.org/releases/javadoc/current/org/apache/beam/sdk/io/FileIO.html#:~:text=the%20file%22%2C%20ex)%3B%0A%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%7D))%3B-,Writing%20files,-write()%20and FileIO writes per window/pane and it inserts a group by key for those writes.
To handle this, you will either need to insert windows which will allow the write to complete or use triggers to fire early - https://beam.apache.org/documentation/programming-guide/#triggers