This still seems not to be correct always: https://tex.stackexchange.com/q/691262/2388 This should really be fix in amsthm directly ...