Growing up in industrial West Yorkshire I have a broad accent, which Heckmondwike Grammar School tried and failed to eradicate. I've been out of Yorkshire 35 years but being married to a Yorkshireman I still have my accent. Unless you try to lose it, you usually keep your own accent if you move away after puberty. It's the same with acquiring a second language - if you move to a new language area before puberty, you'll pick up the new language naturally - afterwards you have to learn it, and may always have a bit of an accent.
My two sons speak with Australian accents of course, but one, a high school teacher, is really posh, the other is not. Same schools, same everything - one of life's mysteries.
I used to speak German with a very posh accent, because I lived with an academic Viennese family for 18 months and they corrected every mistake or any 'Wienerisch' until I was fluent. I did notice that you often get treated better when you sound posh.
I used to lose my Yorkshire accent for a short time when I came home from Austria. This happened when I met my in-laws to be. I had met my husband in the January, but had already arranged a job in Vienna from Jan-April. We wrote and got together when I got back, decided to get married and meet the families. Well, I was still at that post-German speaking phase, sounded accentless and never quite got forgiven for it!!!