This is stylistic advice instead of grammar advice. In America, teachers often tell students to avoid the passive voice when writing--they say it makes your writing sound weaker, and it often results in longer sentences. Several of my teachers would deduct points for passive sentences. Since many teachers do that, and Grammarly is often used by students, Grammarly tags those sentences. So yes, the sentences are grammatically correct English, but many teachers would tell you to avoid them in writing anyway.