Inkscape cannot yet save in PDF format with layers, so to save any changes you make to a PDF pattern file, you will need to save the file in SVG format. (SVG stands for Scalable Vector Graphics, and is used across many software). SVG format will be the default format when you choose File > Save.
For our purposes, saving in SVG format doesn’t change anything, so it is the best format to save files in Inkscape.
If you need to open the layered pattern in another software that doesn’t open SVG files, such as Adobe Reader, you can use a different software, such as one called Scribus, which can save a layered SVG file to a layered PDF file. If you need to open the file in another drawing program, like Affinity Designer or Adobe Illustrator, open the Inkscape SVG file in those software and all layers will be preserved, and no need to use the PDF format to transfer files between the software.