It appears that you are creating an image and mounting it separately, rather than associating it with a RAM disk.
Please see the screenshots below, which illustrate the correct sequence. If done correctly, the newly created RAM disk will have the image file associated with it and the P (Persistent) flag.
After that, you can save some files onto RAM disk, reboot your computer, and the files will still be there.
The steps for associating an image file with a RAM disk:
The result: