This issue might be raised, if the integer rounding produces a sum of elements which doesn’t match the original size.
In that case, you could just subtract the first split:
train_A_dataset, test_A_dataset = torch.utils.data.random_split(
    patch_A ,[int(0.7*len(patch_A)), int(len(patch_A) - int(0.7*len(patch_A)))])

or use floor on one length and ceil on the other:
train_A_dataset, test_A_dataset = torch.utils.data.random_split(
    patch_A ,[math.floor(0.7*len(patch_A)), math.ceil(0.3*len(patch_A))])