Getting rid of invisible notes from partly copied region

When I copy a section of a midi region using range tool (so I do not have to cut it first) the copied region still has notes from unused part visible as white color in the piano roll.
Is there a way to flatten the copied region to get rid of them? Or a preference?

Thanks