tf.keras.layers.MaxPooling2D with padding='same'

In addition to the previous comments note that as a general matter, “same” padding only gets you the same output size when stride = 1 and that is typically not true with pooling layers. Here’s yet another thread which discusses that point.