This won’t work - you cannot patch a package using buildpkg and you cannot add a patched package to to buildiso.
I have never done this but I guess you can do something like this
Run buildiso -x -p sway -k linux514 -b unstable
You will have to clone linux514 from gitlab/packages/core
Add you patch manually and run makepkg to create a package
Use pacman -r /path/to/buildiso/rootfs -U /path/to/your/linux514.tar.zst
You to use manjaro-chroot to install the package - because the rootfs contains symlinks pointing to the wrong location
Copy your final linux514 package to the buildiso rootfs - then use manjaro-chroot to point to that location - then use pacman -U <your-linux514.pkg.tar.zst> to install the custom kernel
Run buildiso -zc -p sway -k linux514 -b unstable to rebuild the changed filesystem and assemble the iso
You can get the most of path to the images by running buildiso -qv -p sway - the rest would be ./x86_64/rootfs
No guarantees - just an idea …
NOTE: If this succeeds - be careful with your VM to not overwrite your home cooked kernel running a pacman sync.