jmf552, and Berger.Fan222,
I think I see exactly what Kleanbore is saying about context, and you've actually not quoted the part of the law which provides that context.
Look at the line given under section 2(3), "(3) Such force is used against a person who unlawfully enters, remains after unlawfully entering, or attempts to unlawfully enter private property that is owned or leased by an individual, ..., claiming a justification of using protective force under this section."
But, what is "this section," that this individual must be claiming a justification of using protective force under? You have to go up one level and read what the actual section heading says, which is:
"563.031. 1. A person may, subject to the provisions of subsection 2 of this section, use physical force upon another person when and to the extent he or she reasonably believes such force to be necessary to defend himself or herself or a third person from what he or she reasonably believes to be the use or imminent use of unlawful force by such other person..."
So the subsections, including all of line 2(3), only kick in if the overall condition laid out by the section heading is met.
In other words, IF the resident of the building reasonably believes there is the imminent use of unlawful force from an intruder, THEN, subsection 2(3) specifies that the violent actor being and remaining unlawfully in the building is one of the exceptions where force would be ok.
Read hierarchically, as an outline form text must be read, simple trespass does not meet the necessary standard on its own.