I'm a little confused as to why we ignore the effect the lone pair has on the geometry of the molecule when it is participating in resonance. Wouldn't it be the case that the molecule is actually in some hybrid state of trigonal planar and trigonal pyramidal? Besides, the resonance with trigonal planar shape has a less importance because it has formal charges and the other does not.
Wouldn't it be the case that the molecule is actually in some hybrid state of trigonal planar and trigonal pyramidal?
"Hybrid state" refers to the distribution of electrons, not nuclei. Different resonance structures can have different electron distributions, but they can't have nuclei in different places, which means that they can't have different geometries. Either you have both of them be pyramidal, or both of them be planar.
Besides, the resonance with trigonal planar shape has a less importance because it has formal charges and the other does not.
Let's briefly digress. At its core, the question is what geometry does the amide have at nitrogen: is it pyramidal or planar?
Most nitrogens prefer to be pyramidal because of lone pair–bond pair repulsion, i.e. classic VSEPR theory. If the amide nitrogen adopts a pyramidal geometry, it therefore gains some stability from having the lone pair further away from the bond pair.
On the other hand, if it is pyramidal then the second resonance structure can't contribute at all (the bond angles at a doubly bonded nitrogen must be planar). So the resonance can only truly kick in if it is planar.
So it boils down to whether the LP–BP repulsion is more important, or the stabilisation from resonance is more important. How do you tell which one is more important, especially when neither of these can be measured quantitatively (with your current knowledge)...?
There are two possible answers to this:
Come up with a quantitative way to measure the repulsion, as well as the stabilisation, so that you can actually say for sure which one is larger. This means lots of theoretical calculations and quantum mechanics.
Take an amide, go into a lab, and measure its bond angles (or some other useful molecular property). You'll find that it turns out to be planar at nitrogen. Logically, that means that the resonance must be more important. How much more important we don't know; but we know it is more important.
So, it doesn't really matter what you or I "think" about the importance of the resonance: the fact is that the amide is planar. The explanation using resonance is merely a way to rationalise the experimental observation that amides are planar.