Hi Boryana,
Thank you for contacting Syncfusion support.
While flatten the form/annotation, internally we removed the form fields/annotations and rendered as a text/shapes. So, the resultant document does not have the annotation/form to perform the Unit test. To ensure the annotation/form flattening, you should compare the output document with actual documents using the image comparison.
Please let us know if you need any further assistance on this.
Regards,
Prakash V