Hey dev! Have you tried using .webm for video instead of loading images? (I know gifs can break rpgm). This ffmpeg command works for me to put videos into RPG Maker MZ.
Code:
ffmpeg -i input.gif -codec:v libvpx-vp9 -crf 30 -b:v 0 -codec:a libopus output_video.webm