Hi @nunop,
@Namna has given you an excellent example of how to achieve this in Shotcut, with, what is effectively a fiddly workaround. That’s because, as you’ve discovered, this is not what fully fledged video editing software that uses timelines and tracks (and not just Shotcut) is designed to excel at. Instead, there are various software alternatives that make this type of job quite easy. Handbrake can probably do it but Avidemux certainly can:
If you require better quality change the constant rate factor (crf) under the configure screen to a value from 20 to 15 or 17. Also, bear in mind that I’m on Linux, so there may be some tiny differences in the software layout but they are insignificant.
HTH.