Aside from keeping the windows shut, there is at least one other solution that is effective in reducing sound with the window open. It consists of installing a sound baffle.
A sound baffle can take various forms. Essentially, it's a flat panel (thin wood, metal, etc.) installed across the open portion of the window. The surfaces of the baffle facing the source of the sound are lined with a sound-absorbing material, such as a thick carpet, which can be tacked or cemented in place.
A similar device can be designed for horizontal sliding windows.