(Med student here with only limited knowledge).
This is correct. The active form of Vitamin D (Calcitriol) can be both helpful and harmful to bone health.
I think the mechanism is not fully understood but in short doses it stimulates bone growth and is a treatment for osteoporosis. In chronic doses it actives cells caused osteoclasts that reabsorb bone.