That is a common problem. Purchase new rubber seal material (by the foot). Mine has two different types, one for the center and a different for the rest.
Remove the existing rubber. Remove the concealed screws, one at a time. Inject sealant into each screw hole then replace the screw.
Using the new replacement rubber, cut the first end to match the angle of the window frame. Jam it into position as far as possible. Mark the second end to be a tight fit, also matching the window frame angle. That way when it starts shrinking it will have the most length possible to shrink before the end is exposed.
Mine has held up GREAT for years using this method.