@JC I had similar struggles after finding and deploying the Microsoft template here, and it was working great...then the container reset. The SSH keys on the atmoz/sftp image reset each time (as it probably should) so the automation built around it kept causing the transfers to fail with the Man In The Middle warning about the key change on the SFTP client.
To get around it, I created two additional file shares in the storage account: one to store the keys, and one to store a bash script. The keys I grabbed from the /etc/ssh directory and put them in the first file share, which I mounted to /etc/sftpkeys in the template. Then I mounted the share with the bash script to /etc/sftp.d, which is a folder that the atmoz/sftp image will run any script after startup (see the atmoz docs here. The bash script just needs to do a copy from the sftpkeys folder to ssh, named something like copykeys.sh: cp /etc/sftpkeys/ssh_host_* /etc/ssh
This has done the trick after several restart tests to keep the keys intact. It avoids having to build your own fork of the atmoz/sftp image. Hope it works for you too.
Chad