Sometimes Maggie Gyllenhaal has worked on films with directors who appreciated her brilliance. Sometimes she hasn’t. “I have learned over…