It's usually up to the judge based on the nature of the crime and the totality of circumstances.  I know of a few former law enforcement officers who lost their job due to pleading guilty to mis DV charges many years BEFORE Lautenburg took effect.  Lautenberg IS retroactive.  Here's a link with the details:

https://www.recordclearing.org/learn-more/domestic-violence-the-lautenberg-amendment-gun-rights/

As DeltaDag stated, be very cautions to pleading "guilty" to ANYTHING unless you fully understand the potential ramifications.