Roku devices don't turn off. Any power button you have on a Roku remote is strictly for the TV. The power button on your Logitech remote could be programmed to do pretty much anything, but it can't turn off a Roku device since, as I said, Roku devices don't turn off.
I'm going to assume that what you mean by "Roku turns itself back on" is that the TV is switching back to the Roku's input after some period of time. Is that it? Can you give us more details? It might also help to know what software version is displayed under Settings->System->About on your Roku device.
Roku Community Streaming Expert
Help others find this answer and click "Accept as Solution."
If you appreciate my answer, maybe give me a Kudo.
I am not a Roku employee.