I cannot reproduce the results using this benchmark code:
def fun1(Y, p=3, m=-3):
    Y[:, :, :,  0, m:] = Y[:, :, :, 0, 1:1+p].flip([-1])
    Y[:, :, :, 1:, m:] = Y[:, :, :, 1:, 1:1+p].flip([-2, -1])
    return Y


def fun2(Y, p=3, m=-3):
    Y[:, :,  0, m:] = Y[ :, :, 0, 1:1+p].flip([-1])
    Y[:, :, 1:, m:] = Y[ :, :, 1:, 1:1+p].flip([-2, -1])
    return Y

Y1 = torch.randn([128, 128, 64, 13, 6], device='cuda')
Y2 = torch.randn([128, 128, 64, 6], device='cuda')

t1 = torch.utils.benchmark.Timer(stmt="fun1(Y1)", globals=globals())
t2 = torch.utils.benchmark.Timer(stmt="fun2(Y2)", globals=globals())

t1.blocked_autorange()
> <torch.utils.benchmark.utils.common.Measurement object at 0x7fe04040ad30>
  fun1(Y1)
    2.28 ms
    1 measurement, 100 runs , 1 thread
t2.blocked_autorange()
> <torch.utils.benchmark.utils.common.Measurement object at 0x7fe04040a070>
  fun2(Y2)
    Median: 226.38 us
    IQR:    6.76 us (224.14 to 230.90)
    8 measurements, 100 runs per measurement, 1 thread

Could you check, if both tensors are contiguous before passed to the functions?