How to adjust gif speed

Not quite. It only controls the number of frames per second. It does not control the number of seconds the video will last. The project timeline determines the length in seconds. Frames will be dropped or duplicated as necessary to meet the FPS target without changing the video length.

18 / 25 = 0.72

Going to clip > Properties > Speed = 0.72 as you did before will put the clip into slow motion. As you noticed, frames are duplicated to stretch the video runtime while remaining at 25fps. Once the FPS is dropped to 18, the duplication will disappear. It takes both modifications working together to change the delay between source frames.

The FPS can be set to 18 either with a custom Video Mode, or at the Export panel under Advanced. There are fewer bad surprises / easier troubleshooting / fewer layers of math when using the Video Mode to set FPS rather than the Export panel.

This is normal. GIF is not a traditional video format. It can have arbitrary timings from frame to frame, which is at odds with the constant frame rate of a video timeline. If you convert, use the highest quality mode.

It might be a notable omission for a dedicated GIF editor, perhaps. But for conventional video editors, this is not weird at all. Most people don’t edit a two-hour blockbuster movie, then at the very end decide to speed up the whole thing by 1.25x.

This could be tricky. As I’m sure you know, GIF uses a 256-color palette. Matching (optimizing) the palette to the colors that are actually used in a video is critical to achieving high quality. By nature, this is a two-pass operation (first to find the most common colors, then to encode the GIF using those colors), but Shotcut does not export GIF in two passes. Quality will suffer due to a more generic palette. A highest-quality GIF creation method using ffmpeg is described here:

Another option that’s much easier to use is Animated PNG instead of GIF, which also gets past the 256-color limitation. Shotcut can export directly to Animated PNG like this: