I saw already all the links about this problem here at StackOverFlow but none of them could help me. I am trying to change the section names in ToC to uppercase using also the hyperref package but it doesn't work.
Here is my code:
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage[brazil]{babel}
\usepackage{geometry}
\usepackage{caption}
\usepackage{indentfirst}
\linespread{1.5}
\usepackage{afterpage}
\usepackage{listofitems}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsthm}
\usepackage{lipsum}
\usepackage{array,mathtools}
\usepackage{graphicx}
\usepackage{float}
\usepackage{tikz}
\usepackage{pgfplots}
%\usepackage{xstring}
\usepackage{lastpage}
\pgfplotsset{compat=1.15}
\usepackage{geometry}
\usepackage{enumerate}
\usepackage[labelsep=endash,format=hang,font=small]{caption}
\geometry{a4paper,
top=3cm,
left=3cm,
right=2cm,
bottom=2cm,
}
\usepackage[num]{abntex2cite}
% MODIFICAR TÍTULOS DAS SEÇÕES DE FIGURAS, TABELAS E SUMÁRIO
\addto\captionsbrazil{%
\renewcommand\contentsname{\hspace{\fill}\bfseries\large\sffamily SUMÁRIO\hspace{\fill}}
\renewcommand\listfigurename{\hspace{\fill}\bfseries\large\sffamily LISTA DE FIGURAS\hspace{\fill}}
\renewcommand\listtablename{\hspace{\fill}\bfseries\large\sffamily LISTA DE TABELAS\hspace{\fill}}
}
% AJUSTAR AS SEÇÕES E SUBSEÇÕES
\usepackage{titlesec}
\usepackage{titletoc}
\titlespacing{\section}{0pt}{0pt}{1.5cm}
\titleformat{\section}[hang]
{\bf\sffamily\large}{\thesection}{20pt}{\MakeUppercase}
\titlespacing{\subsection}{0pt}{1.5cm}{1.5cm}
\titlespacing*{\subsubsection}{0pt}{1.5cm}{1.5cm}
% MODIFICAR O SUMÁRIO
\titlecontents{section}[1cm]{\bfseries\sffamily}{\contentslabel{3em}}
{\hspace{0em}}{\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsection}[1cm]{\sffamily}{\contentslabel{3em}}
{\hspace{0em}}{\titlerule*[1pc]{.}\contentspage}
\titlecontents{subsubsection}[1cm]{\sffamily}{\contentslabel{3em}}
{\hspace{0em}}{\titlerule*[1pc]{.}\contentspage}
% MODIFICAR A LISTA DE FIGURAS
\titlecontents{figure}[0em]{
Figura~\thecontentslabel \enspace - \enspace
}{}{\hspace{0em}}{\titlerule*[1pc]{.}\contentspage}
% MODIFICAR LISTA DE TABELAS
\titlecontents{table}[0em]{
Tabela~\thecontentslabel \enspace - \enspace
}{}{\hspace{0em}}{\titlerule*[1pc]{.}\contentspage}
\usepackage{fancyhdr}
\pagestyle{fancy}
\fancyhf{}
\fancyhead[RO,LE]{\thepage}
\fancyhead[RE,LO]{}
\renewcommand{\headrulewidth}{0pt}
\usepackage[colorlinks=true, linkcolor=blue, citecolor=blue, filecolor=blue, urlcolor=blue]{hyperref}