The Monaco Grand Prix will remain on the Formula 1 calendar until 2031, the series has announced.