My dentist told me I was missing a bone in between gap but during my invisalign treatment my gap is starting to close. What's the reason for this?

Problematic. Teeth can be moved into an area where bone has been lost to the detriment of their support system. For reasons such as this it is advisable to see a Specialist for Specialty Treatment. A second opinion may be in order.
See your dentist. Untreated gingivitis can advance to periodontitis and can eventually lead to gap between the teeth, tooth loss and other health problems. See your dentist if you suspect you have gum disease because the sooner you treat it the better.
Pressure. The space between your teeth is closing due to the pressure the aligners are exerting on your teeth. Please refer other questions about the level of bone to your provider. They have examined your radiographs and are better prepared with the correct answers.