A global view on star formation: The GLOSTAR Galactic plane survey VIII. Formaldehyde absorption in Cygnus~X