Are you testing your cake for doneness in the centre before taking it out of the oven? Sometimes a 9X13 inch cake starts to brown around the edges but the centre still isn't quite done. It'll sink a bit in the middle on cooling if this is the case. Wilton sells a product called Bake Even Strips that help a cake bake evenly. The strips come in different sizes. I've used them and they really work. The ones I have came 2 to a package and fit around 9-inch layer pans. I have to join the two strips together when I'm using my 9X13-inch pan.