That’s intended. Loop ranges and modes are closely “tied” to the sample waveform data. So if you set up a new buffer, you should set up new loops as well.
If you want to retain them while copying, do so manually by memorizing them before recreating the buffer and then applying them again on the new buffer.
Ya, i realized it makes sense after posting, since the loop points are likely to be invalid x)
I still feel it would be a little more convenient to default to loop-mode “off”, but certainly no problem there.
Cheers
You can store the loop-points in an array if you need to restore those. Just make sure you add a sanity check that the stored loop point positions can actually be set into the newly created sample or not.