In section 10.2.1.3 Interpretation of intrinsic assignments
If the variable is an allocated allocatable variable, it is deallocated if expr is an array of different shape, any corresponding length type parameter values of the variable and expr differ, or the variable is polymorphic and the dynamic type or any corresponding kind type parameter values of the variable and expr differ.
It does not say that it is deallocated if the arrays are the same shape, but it also doesn’t say that it is not deallocated. There might be a phrase else that I haven’t found that says more. It might be reasonable to write an interpretation request if someone were so inclined.