Megatron doesn't appear in Transformers: Rise of the Beasts. Nor does the story reference the Decepticons' leader at all. Provided that Rise of the Beasts takes place in the same timeline as the first Transformers movies, it makes sense that Megatron isn't part of the story.