When one part of speech substitutes for another, it remains what it is. It does not change according to the function it is being used for. Fence is a noun used to modify post adjectivally. A mile is a noun used to modify high adverbially. Verbs, in any of their verbal forms, are used to name, to modify adverbially, or to modify adjectivally.
Phrases are just as versatile.
Too often teachers and others confuse the name of the word with its function. The term gerund, as explained before, only confuses the student. It is a useless term. It is a participle used as a noun in spite of what the dictionary may tell us. The dictionaries follow the fallacy followed by scholars who insisted on making English grammar fit the Latin mold.