How do I effectively fill gaps with between window mesh and window frame?
The foam weatherstripping you linked is 1.5 inches (38 mm) wide. Just turn it sideways and attach it to the face of the bottom of the screen instead of to the top of the sill. If you had 0.5 inches (12.5 mm) of material hanging off the bottom of the window you'd still have 1 inch (25 mm) of material stuck to the frame. I'd put some staples in it just to make sure it doesn't fall off, but you're not looking for a super tight seal here, just something to stop bugs from crawling in.
:EDIT: - Like this: