CustomPotionEffects should be pretty much equivalent to the /effect command:
With /effect, infinite duration saturation, instant health, or instant damage can be applied. Potions can only apply these “instant effects” for a single tic if the duration is set to -1. Other effects which are not instant work correctly
Additionally, /effect can safely apply effects with amplifiers up to 255, while CustomPotionEffects potions can only go up to 127 before the effect behavior is nullified.
Related issues
duplicates
Comments


/give @p potion{CustomPotionEffects:[{Id:6,Amplifier:0b,Duration:-1},{Id:7,Amplifier:0b,Duration:-1},{Id:23,Amplifier:0b,Duration:-1}]} 1
Expected behavior of the potion: Apply Instant Health, Instant Damage, and Saturation for an infinite amount of tics, similar to other effects.
Actual behavior: Only applies it for 1 tic. It doesn't work if it's just a really big number either, itll only do it for 1 tic regardless of Duration.
For the amplifier part, yes, that appears to be a similar issue, however, /effect seems to be able to apply these effects with amplifiers above 127 perfectly fine.

Because /effect sets the field directly, not the save-data.

The first part is MC-142061.
First part; what's the command you used?
Amplifier part: Duplicate of MC-118857.