I have a very basic confusion about Chern-Simons forms: On Wikipedia and other sources, it is stated that the Chern-Simons 3-form $$Tr(A\wedge dA+\frac23 A\wedge [A\wedge A])$$ trivializes $Tr(F^2)$, where $$F=dA+[A\wedge A]$$ is the curvature 2-form of the connection 1-form $A$ of a Lie-group principle bundle. Now, $Tr(F^2)$ is proportional to the second Chern character, $$\frac12 c_1^2-c_2$$ which is a characteristic class, i.e., a cohomology class in $H^4(BU(n), \mathbb{Q})$. More specifically, we can imagine $Tr(F^2)$ as a specific representing cocycle of this class, which is pulled back via the classifying map of the principle bundle from the base manifold to $BU(n)$ (chosen some $U(n)$ representation of the Lie group $A$ takes values in). A locally computable trivialization of $Tr(F^2)$ should arise from a trivialization of the corresponding cocycle on $BU(n)$, also by pullback via the classifying map. However, since $\frac12 c_1^2-c_2$ is a non-trivial characteristic class, $Tr(F^2)$ shouldn't have any locally computable trivialization.
So where is my misconception here? Is it that even though $c_1$ and $c_2$ are non-trivial as $\mathbb{Z}$-valued characteristic classes, the Chern character is trivial as a rational characteristic class? Or is it that if we consider those characteristic classes applied to principle bundles instead of vector bundles as usual, they become trivial? Or has it something to do with the choice of $U(n)$ representation of the concerned Lie group? Or am I misinterpreting the statement that the Chern-Simons form trivializes the Chern character?
Let me omit all the details:
Let $P \overset{\pi}{\to} M$ be a $G$ principal bundle. A connection 1-form on this principal bundle is a form $\omega \in \Omega^1(P,\mathfrak{g})$ with two extra conditions. Its curvature is defined as $F:= d\omega + \omega \wedge \omega \in \Omega^2(P,\mathfrak{g})$. One can show that it is horizontal ( vanishes if you plugin a vertical vector field) and $G$-equivariant. Those forms can be identified with forms in $\Omega^2(M,P\times_{ad}\mathfrak{g}$). (Its helpful to spell this out in local data)
Lets say we have $G=U(n)$ now. The trace defines a bundle morphism $P\times_{ad}\mathfrak{g} \to M\times\mathbb{C}$ which allows us to write $Tr(F^k) \in \Omega^{2k}(M,\mathbb{C})$ and define chern forms (and then classes) etc.
A natural question now, is what happens if we have two different connection 1 -forms $\omega_1, \omega_0$. Their difference $A := \omega_1 - \omega_0 \in \Omega^1(P,\mathfrak{g})$ will now also be horizontal and $G$-equivariant and you can show that $$CS(A):= Tr(A \wedge dA + \frac{2}{3}A\wedge[A,A])$$ can identified with a 3 form $\in \Omega^3(M,\mathbb{C})$ with $dCS(A) = Tr(F_1^2) - Tr(F_0^2) \in \Omega^4(M)$. Meaning the corresponding cohomology class is independent of the chosen connection.
I actually don't know any good sources on this for principal bundles, but there are plenty of lecture notes/books covering it for vector bundles, which will help anyway I guess.
PS: I guess your equation (replacing $A$ with $\omega$) $dCS(\omega) = Tr(F^2)$ is actually correct, but in $\Omega^4(P)$ and I believe it shows, that $c_i(\pi^*P) = 0 \in H^{2i}(P,\mathbb{Q})$, which is true since $\pi^*P \to P$ is the trival $U(n)$ principal bundle over $P$.