On guitar, due to its tuning, sometimes there is little choice as to how some chords are voiced.
The root 'inversion' of a chord is the strongest sounding, as the root note is the lowest heard.
There is nothing at all wrong with playing a 1st or 2nd inversion of a chord, on guitar or any other chordal instrument.
On guitar, there are really only two major chord shapes which incorporate the bottom string playing the root . E shape and G shape, both completely moveable up the neck.
A shape and C shape have the root note on the fifth string, although another note from the chord is playable on the bottom string.
Playing the chord as a six string version is not a 'mistake', and is quite acceptable - although a lot of guitar driven websites seem dutybound to state that those chords must be played without the bottom string sounding at all. Thus missed or muted.
When strumming, it's often difficult to not play that 'wrong' string, so it's not inconvenient to leave it as part of the chord, where it will still be in tune with the rest of the chord, merely producing a different voicing, in its inversion.
Use it (if it's in tune!), and it's not wrong! Sometimes it's actually a good thing to have a different lowest note in a chord somewhere in a song!