What's the role of the word flying in both sentences and drones in the latter, please?
- Troy enjoys flying.
- Losi's hobby is flying drones.
And how to differentiate between a gerund and a complement in sentences?
[i] Troy enjoys flying.
[ii] Losi's hobby is flying drones.
'Semantic role' is the underlying relationship that a participant has with the main verb in a clause.¹ But I guess that's not what you're asking for; I believe by 'role' you mean the grammatical functions of the phrases.
Complement is a grammatical function that has a close relationship with the verb. It's usually obligatory. So it's clear that 'flying' in [i] is complement of the verb enjoy.
Gerund is a verb form.² So it's inappropriate to say 'flying is a verb functioning as a gerund'. Flying in [i] is a verb (in the form of gerund) functioning as complement of the verb 'enjoy'.
Drones in [ii] is a noun that functions as object of the verb flying.³ Flying, on the other hand, is a verb (gerund) that heads the gerund clause flying drones, which functions as the complement of the copula is.
¹More info is here.
²I don't distinguish between 'gerund' and 'present participle'. So what you call 'present participle' is a gerund here.
³An object is a kind of complement. So it's also okay to say drones is a complement of the verb flying.