There are several things that can come into play.
One is that Roku has a Bandwidth Saver issue that stops streaming after four hours. That can be disabled at Settings > Network > Bandwidth saver
If it's at four hours that you're getting the notice, this is probably why. If it's at a shorter period of time, it's not this (though you may still want to check the setting), but a setting within the app.
Many apps have Autoplay settings, though not every app has the ability to enable it or disable it. Some always autoplay, some never autoplay, and some give you the option. If the app never autoplays, then it never autoplays, and there is no device setting to override that.
Some apps have an inactivity timeout, which is similar to Roku's Bandwidth Saver. If no user interaction within a specified period of time (two hours is common), then when the content ends, autoplay stops. If my description isn't clear, let me offer a specific example. Plex has the ability to turn autoplay on or off. If I have autoplay on, and play a series, if after two hours, I haven't touched the remote, the stream will stop when the currently playing episode ends. So, if a series has 50-minute episodes, it will play three then stop. One episode is :50, 2 episodes is 1:40, so the third episode is playing when 2:00 happens, and when the episode ends at 2:30, the autoplay stops.
Keep in mind that if you turn off Bandwidth Saver, it's possible the Roku will continue to stream even if the TV is turned off (assuming you have a Roku attached to a TV, not a Roku TV). If you have a data cap, you could encounter this.
Roku Community Streaming Expert
Note: I am not a Roku employee.
If this post solves your problem please help others find this answer and click "Accept as Solution."