There are three ways to use voice typing in Google Docs:
1. Use Dictation Box
To use all the features of Voice In, use the dictation box to type in your text. Place the cursor in the dictation box and dictate normally. Once you are done, you can copy/cut the content into Google Docs.
2. Voice Type directly into your doc
You can place your cursor directly in your Google Doc. As Google Doc uses an opaque document structure, Voice In is not able to see where your cursor is on the page. As a result, it is unable to do text formatting like capitalization or word spacing accurately. Also commands like delete word won't work.
Note that this issue happens only on Google Docs / Slides. Voice In works perfectly well on other sites.
3. Use the built-in voice typing tool
Use the built-in voice typing tool in Google Docs. Go to Tools > Voice Typing to enable that. This is a built-in feature in Google Docs. Note that you will not be able to use your custom voice commands with this tool.