When a former designated public office holder leaves office, they cannot lobby for five years. There is a small gap if you work for a corporation, in that you can lobby up to 20% of your time. However, if that person is a senior official, it's complicated. They end up in the registry and then they are subject to the code, but unless you're on the registry of lobbyists, you're not subject to the code.
As another aspect, anyone who leaves public office is subject to a five-year restriction. If anyone ever decides to leave office, I encourage them to call my office to understand the rules, because they're complicated.