The crime of burglary is "trespass with the intent of committing
a felony". The "felony" or "attempted felony" is not specified in
any way.
If the suspect trespasses with the intent of forcing himself on
the homeowner (or resident), the suspect has burglarized a
residence with sexual motivation.
In other words, he burglarized in order to commit a felony,
sexual offense.