Finally got to the bottom of the issue!! it's quite convoluted but the key is that error only happens if the resized index has the same number of shards as the source. This can happen for a few different reasons (in our case we were hitting a bug that was fixed in v7.17.5) but in the case of the original post, I think you have set rollover and shrink to the same size, meaning after rollover the number of shards it tries to shrink the index to will be the same. In order to actually shrink, the number of shards in the source index must be an integer multiple of the desired shards in the target (e.g. if you have an index with 6 shards, you could shrink it to 1, 2, or 3 shards, but there's no need to shrink at all if if the shard size is being kept the same). If you have 3 shards at ingest then to get a target shard size of 50 gb after shrink, you'd want them to be around 15 gb at rollover (need to be a bit careful to add a little slack here, otherwise it won't be able to shrink if it goes slightly over the rollover limit).
In a more recent ES version, ILM has now been fixed to not do anything if the source and target indices have the same number of shards, so you wouldn't hit this issue, but it seems using the shrink API directly is unsafe and could lead to this bug, would need to test on a newer ES version.