The problem is that both this notation tends to get used in an ambiguous fashion *and* it depends on just what you are taking the inverse of.
This is unfortunately, not explained too well, but there is a *difference* between "cos" and "cos(x)", even though that often times they get slopped together. "cos" is a *function*: it is a mathematical object of a different "type" from a number. "cos(x)" is a *number*: it is the number that is generated by applying cos to the number "x". The specific individual number may be unknown or undetermined at this time if we have not bound "x" to a value, but it is still a number.
When dealing with functions, functions don't, "by default", "multiply", they *compose.* When a function is exponentiated, viz. f\^n, it means it gets composed with itself n times, viz. f\^2(x) = (f o f)(x) = f(f(x)). When the exponent is negative, that means it has to be anti-composed, which means taking the inverse function.
When you take 1/\[cos(x)\], you are taking the reciprocal of a number. Note the bracketing. The whole thing "cos(x)" goes into the division. This is, of course, sec(x). When you take "cos\^-1(x)" - note where the "\^-1" part is. It's on cos - "cos" is *a function*. Thus it generates the function inverse. Were it "\[cos(x)\]\^-1" instead, then now "\^-1" is acting on *a number*, and thus this is equal to *the number* "sec(x)" (*not* "sec", i.e. writing "\[cos(x)\]\^-1 = sec" is nonsense or, at least, false.).
Of course, all this is unfortunately thrown off for trig functions by the fact that historical cruft causes people to most commonly understand something like "cos\^2(x)" as meaning "\[cos(x)\]\^2" and not, as consistency should have it, "\[cos o cos\](x)" i.e. "cos(cos(x))". Yes, that's super inconsistent. If you want, you can always put a small circle, of the same appearance as a composition infix symbol, before the exponent to indicate explicitly that compositional power is intended, viz. "cos\^o2(x)" means "cos(cos(x))" unambiguously, and "cos\^o-1(x)" means "arccos(x)".