Field data type unknown even with mapping

Can you share the json document you have in Elasticsearch?

Go in the expanded document in discover, select the json tab and share the entire document.

Also, did you rollover your data stream after changing the mapping? When you change a template mapping it will only be applied to newly created indices.