Disable iCloud Photo Library on Mac
When you disable iCloud Photo Library, it will not delete any full resolution photos that are already on your computer. The issue is that your entire photo library has not yet been downloaded. You need to disable Optimization to force iCloud Photo Library to download the rest of the library.

What it will delete are thumbnails that have no corresponding image yet. For example, if it hasn't downloaded an image, it will discard the thumbnail (because there is no corresponding image). If you are receiving the message than that means that something hasn't yet had a chance to download. If your library is small enough, the simplest thing to do is simply look at each photo at full resolution, with Optimization of Storage off. This will force each one to download.