If I use -colonly command at the end of the collision shape's name, in Godot it is added in a separate node and not in the root node giving me this error.
Are you meaning adding a CollisionShape node, and just a CollisionShape node? (Not a StaticBody/RigidBody node with a CollisionShape?)
Unfortunately, there is no way to import a mesh as just a CollisionShape using flags, or at least none that I know of. You can import the mesh you want to use as a CollisionShape by exporting it normally (no extra flags) and then converting it into a triangle CollisionShape in the editor (select the mesh, and then click the "mesh" tab at the top of the viewport) and then use the triangle CollisionShape generated from that. Then you just have to either hide or delete the mesh you used to generate the collision once you are done with it.
It is not really a ideal workflow, but it is the only one I know of. Another thing you could try is using the workflow like in the links aztecsensei posted, and then just re-parent the CollisionShape and delete the StaticBody/RigidBody.