Where is the leak? Is it between the window frame and the house framing?
Generally, I prefer to seal any leaks as close to the outside envelope of the house as possible, to keep the cold winter air as far from the interior as possible.
Caulk is one option. Or, since all that drywall is behind the trim, you could cut away more of the drywall in order to gain access to foam it more thoroughly.