Forcefields do help on countering spawn killing, but only to an extent, due to the fact that if the forcefields are active on the player and the player fights another enemy player with their own weapon, the player would perform an act similar to spawn killing called "forcefield killing". Forcefield killing is equally frowned upon as regular spawnkilling by many players, as the forcefield may prevent the player from taking most damage from many sources, which allows the player with the forcefield to safely fight any incoming enemies, including spawnkilling enemies, more easily.
Some weapons such as the Frost Blade can break forcefields.
Usually, spawnkilling and forcefield killing come from the fact that a place was not well designed, due to the poor design of the map and/or the weapons that are present in the place. When weapons are designed correctly, it is easy to prevent both. For example, a simple fix to both would be to give a forcefield to players when spawning, make the weapons such that they use the TakeDamage method instead of directly changing the health (which is bad practice for weapons anyway) and make the forcefield disappear when a weapon is selected. There are also many other ways to prevent it, such as only giving the weapons to the player once the forcefield has disappeared.
Unfortunately, as most place creators do not have the knowledge required to implement a simple fix like the ones mentioned above and instead just insert the weapons directly from the free models, spawnkilling and forcefield killing are both problems that frequently happen.