I don't think you can do exactly what you are asking for in Photoshop but I have a workaround which may be helpful.
Create a new document bigger than you will ever need your window to be. I created one at 4000 x 4000 pixels. Recreate your application frame in this document without any space around it or drop shadow. Select all and go to Edit → Define Pattern...
Back in your original document, create your live rectangle, add a layer style with your drop shadow and your newly created pattern as a pattern fill and hit the Snap to Origin button. You can now move and resize your 'window' and the top bar will stay in place.
This isn't perfect, obviously your pattern isn't easily editable but you can save it as its own PSD and recreate the pattern as needed.
Another option is to use the same trick with an oversized window but place it as a Smart Object and use a mask to create the shape. This makes editing the window much easier but all resizing would need to be done on the mask.