One problem is that the entire concept of "part of speech" is very old. How we use it in English, especially in dictionaries, goes back to the study of Latin and Greek. In this view of English grammar "adverb" is the catch-all category where everything that doesn't fit into one of the other traditional categories ends up. (The others being noun, verb, adjective, pronoun, preposition, conjunction, and interjection.)
Now there is no one, true description of any language (except perhaps constructed languages such as yours). There are merely alternative or competing descriptions which appear over time as more independent analyses of the language are undertaken. Such descriptions or analyses may be called "grammars".
Most (but not all) grammars include a concept of word class under one name or another. So one problem is that "part of speech" has two meanings. One is the specific set of eight categories from the classical languages, the other is as a synonym for word class, which is a lot looser.
So all your example words are adverbs under this older stricter view of parts-of-speech, but their qualities and quirks can be much more thoroughly investigated in newer ways. And various new ways will have various new terms for the classes they put these various words into.
Unless you are inventing a new language specifically to embrace the classical parts of speech you don't have to worry in which they belong, but if you are inventing a new language to learn more about how language works then it will be worth your time reading up on the many newer grammars and language descriptions and analyses.
Yes, slang, profanity, and this sort of muted or pseudo-profanity don't necessarily follow the conventional rules of grammar.
When these sort of words are used as adjectives, they are at least grammatically consistent. If we assume that "to freak" is a verb that presumably means something bad or unpleasant, then, "Make your freaking dog stop barking" makes some sense: the speaker want to express that the dog is doing something unpleasant, so if "to freak" is bad, then describing the dog as a "freaking dog" means he is doing something bad. Of course when taken more literally, it still doesn't make much sense. I presume when people say "to freak" they are using that as a euphemism for another word that begins and ends with the same letters and that refers to sexual activity, and the dog in question is probably not engaging in sex. The train but surely is not.
As an adverb -- "Just freaking go", it makes no grammatical sense. You could say, "Just go freakingly", but what does that actually mean? Sometimes people say, "Go freak yourself", which again is unlikely to resolve the immediate issue or be physically possible, but at least is grammatically coherent.
Of course we don't normally expect insults and profanity to make literal sense. They're just words added to a sentence to express anger or dislike, or to establish yourself as one of the cool people who use such words. The f-word, in particular, rarely makes sense in context if interpreted literally.
Most slang words, whether mild or vulgar, are not being used for their literal meaning, but rather are used to mean either "bad" or "good". There are probably dozens or hundreds of slang words in use at any given time that all mean "bad" or "good", from "groovy" to "cool" to "phat", etc.
Best Answer
In [1] "as" is a preposition and the expression "as the dog (is)" is thus a preposition phrase functioning as complement of the adjective "same". The verb "is" can be optionally added. The whole expression "the same as the dog (is)" is an adjective phrase functioning as predicative complement of the verb "be". Note that "the" is a dependent of "same".
In [2] "like" is an adjective" and "just like the dog" is thus an adjective phrase functioning as predicative complement of "be".
In [3] "to the dog" is a preposition phrase functioning as complement of the adjective "similar". "Similar to the dog" is thus an adjective phrase functioning as predicative complement of "be".
Note that all three examples are comparative constructions.