my whole college education I was sure that ICMP protocol is a Network Layer protocol. I am now working with 6TSCH protocol and it's stack contains ICMPv6 in a Transport Layer, for example in this RFC: https://datatracker.ietf.org/doc/rfc9030/. I totally agree with answer in this thread: ICMP is a protocol working in the Network Layer. Why does it send few fields of the transport layer while reporting an error? that model is just that - a model, but all research papers I stumbled upon just show the stack with ICMP in Transport Layer with no explanation why is that the case in this technology stack. Is ICMP's use case in this technology stack other than in wired networks?
ICMP is an integral part of IP's network layer.
The linked RFC shows that it is technically encapsulated by IP like a transport-layer protocol (which is correct) but doesn't state that ICMP belongs to the transport layer (which it does not).
Going by encapsulation alone is a common mistake. A protocol's position in a layering model is generally defined by its functionality, not by its encapsulation. In that respect, a network stack can differ considerably from a network model.