I did not understand your title, why would some dependencies would fail to get installed to package.json. The only explanation would be forgotten --save flag upon npm i.
Moving onwards,
Is there a optional file format for package.json to define our dependencies?
No.
If not, how can we manage to create a package.json with comments?
See the original question that this question duplicates: How do I add comments to package.json for npm install? there are some recipes there. Personally, I don't want to put comments in package.jsons, but I do use comments in my JSON's. I simply add dummy fields like "widt__comment___(value_below_is_capped_to_660_||_false_will_be_set_to_660_too)": false,. I omit the last letter and it appears on top when JSONs are sorted (next field would be width, so its comment starts with widt_).
why node/NPM forces developers NOT to document, by choosing a fileformat which makes it impossible to document?
package.json will have to be reliably parsed and rendered back, what limits the possible formats' choices. JSON is very reliable, old format, with very strict, known rules on its parsing and rendering. JSON is also covered by standards RFC 7159 and ECMA-404. TOML is not covered by any. YAML is not covered by any standards either. By the way, TOML is still on v0.x which is not even considered stable as per Semver.