Weird artifacts on rendering

I have a problem where rendering a project sometimes causes glitchy artifacts on the finished file. It usually happens after quick transitions or a clip appears for only a few frames on the timeline.

https://preview.redd.it/xuhj04k75by81.png?width=1451&format=png&auto=webp&s=1b311dd648fb5cf55966172a1b7a465b0ca67679