I read often that both concepts are quite different, but I could not find a good explanation about where the differences lie. Both bundle dependencies and restrict talking to the outside world.
When should I pack my app in a container for deployment? When would encapsulated packages be preferable?
Flatpack offers a clues its FAQ includes:
A container aims to offer isolation on any system which implements its runc/containerd protocol, and will be soon on Windows as well as Linux.
That differs from software packing format which are quite tied to the OS.
See "Flatpak, Appimage And Snap – How Do They Stack?".