Pressing Apply Breaks Prefab

I added an empty GameObject to a prefab to act as a folder, moved the necessary objects into it and hit apply on the prefab, but the entire prefab turns from blue to gray text as if it wasn’t a prefab anymore and the changes aren’t applied. I tested this by deleting the object from the hierarchy and dragging the prefab back in but my changes aren’t there.

What am I doing wrong?

Unity keeps track of the root object of a prefab hierarchy. If that object or any child of that object changes, you can press the Apply button and the changes will propagate to other prefab instances. What you’re trying to do is use a different object as the root object. What you have to do in that case is to replace the prefab. To do this set up your new prefab hierarchy, left click on it in the scene hierarchy and drag it into a folder in the assets view. If you drag it over the previous prefab in the asset view you will essentially replace your prefab achieving your desired result.