I agree the parents are in control overall and really must carefully limit screen time as it's so addictive. There have been cases of youngsters getting seriously overcome by their addiction.
However, I think grandparents can set their own rules when the children visit or stay over. My house, my rules! It requires careful planning of course, you want to avoid a screaming fit if possible. As others have said, keep them occupied in other ways, either going out or with indoor activities. Have plenty of games, colouring, crafts, whatever. If you can engage their interest with some kind of discussion or interesting true story that's good. Just try to keep them interested. Obviously outdoor activities are best when possible. Keep the screen time for when it's convenient for you, when cooking the dinner or whatever.
I might add that a good movie can always count as screen time, but not cartoons/animations. Mine watch old movies (with real people) when they're with me. There are so many to choose from. Think of the ones you loved as a child.