The Teutonic Order owned lands, variably, within Germany, Hungary, the Levant, Prussia, and the modern Northern Baltic.
While some of these lands -- such as the territories in Germany -- were certainly part of the Holy Roman Empire, there is more confusion about the other territories, specifically the Baltic territories
For example, WP says the following (unsourced):
The monastic state of the Teutonic Order (German: Deutschordensstaat) and its later German successor state of Prussia were never part of the Holy Roman Empire.
Despite the statement, the illustration to that exact claim actually includes the Teutonic Order State's lands in Prussia:
Meanwhile, the WP on Medieval Livonia says:
It was established on 2 February 1207, as a principality of the Holy Roman Empire, but lost this status in 1215 when Pope Innocent III proclaimed it as directly subject to the Holy See.
The above is based on Herbemann's 1907 'Catholic Encyclopedia' which actually notes:
In 1207, this territory became a principality of the Holy Roman Empire, but in 1215 Pope Innocent III took the Livonian bishopric under his direct protection, naming it Terra Mariana.
There is no specific mention of "lost this status" as in the WP article.
Meanwhile, the State of the Teutonic Order WP says about a moment after 1215 where the Emperor made decisions affecting those very same lands:
Early in 1224, Emperor Frederick II announced at Catania that Livonia, Prussia with Sambia, and a number of neighbouring provinces were under Imperial immediacy (German: Reichsfreiheit). This decree subordinated the provinces directly to the Roman Catholic Church and the Holy Roman Emperor as opposed to being under the jurisdiction of local rulers.
Further, the same article writes about the 16th century:
[After secularization...] The Habsburg-led Holy Roman Empire continued to hold its claim to Prussia and furnished grand masters of the Teutonic Order...
Implying that there was an Imperial claim to the Teutonic Order.
This is confusing, given the number of sources and their conflicting statements. Therefore, I am looking for an explanation on whether the lands of the Teutonic Knights in the Baltic region (Prussia, Estonia, and Latvia) were a part of the Holy Roman Empire?