Do 和 and 跟 have different grammatical functions？
和 and 跟 may have the same grammatical function, when they introduce a verbal company complement, occurring before the verb. Then both are prepositions. Even more so, in the linked Zdic entries, both of them are respectively used to define the other:

【和】： 连词，跟，同：我～老师打球。
【跟】： 和，同：我～他在一起工作。

In that case, they both describe together with whom the action occurs and can be used interchangeably:

我喜欢和他聊天 and 我喜欢跟他聊天
我和你说一下 and 我跟你说一下
我想和我父母去度假 and 我想跟我父母去度假

As you can see, they are used when the noun refers to a human.

That aside, 和 also works as a conjunction, as Zdic notes (连词), more specifically to coordinate nouns1. In that case, it can't be grammatically replaced with 跟：

西班牙和葡萄牙，我都去过
登机前请您准备好护照和登机牌


Additional Notes
The linked Zdic entries may appear confusing with respect to a point: I say that 跟 is interchangeable with 和 when they both are prepositions, but Zdic uses 跟 to define 和 when it's a conjunction! From the 和 entry:


连词，跟，同：我～老师打球。

介词，向，对：我～老师请教。



The examples provided there also don't do a good job at disambiguating, as the position of the word in both 我～老师打球 and 我～老师请教 is exactly the same.
I think that's a mistake of the dictionary, because 跟 is grammatically equivalent to 和 only when used as a preposition (介词) — in that case, Zdic is more accurate, as 跟 is defined in terms of 向 and 对 just as 和 is.
My examples above show the role of 和/跟 as prepositions by placing the prepositional phrase as not contiguous to the subject of the main sentence.

1: you can't use 和 to coordinate verbs, or entire sentences