Yes, I know. My son's team does this regularly; it's not a trick play, but can be surprising for opponents, since my son can throw the ball quite far (he also plays volleyball). They also do the "throw-in as a pseudo corner kick" play usually a couple times a game as well.Sorry...
A player cannot be called offside when receiving the ball directly from a throw-in.
This is actually a "trick" play. If the ball goes out and the next player sprints to get it and immediately throws it in to a forward who is offside they have a direct line to goal.