Yes, it has always been valid since the first edition of the ECMAScript language specification.
According to the 10th edition of the ECMAScript language specification published in 2019 (see: ECMAScript Language: Lexical Grammar - Names and Keywords), the grammar for variable names is:
IdentifierName::
IdentifierStart
IdentifierName IdentifierPart
IdentifierStart::
UnicodeIDStart
$
_
\ UnicodeEscapeSequence
IdentifierPart::
UnicodeIDContinue
$
\ UnicodeEscapeSequence
<ZWNJ>
<ZWJ>
...
As you can see, it is valid to have $
anywhere in the variable name.
This has always been the case since the first edition of ECMAScript standard published in 1997. Section 4.5 Identifiers from the first edition says:
An identifier is a character sequence of unlimited length, where each character in the sequence must be a letter, a decimal digit, an underscore (_) character, or a dollar sign ($) character, and the first character may not be a decimal digit.