I live in Fort Lauderdale. Our sailing is all ocean. You get a bit tired of just seeing the beach up and down the SE Coast of Florida...not many anchorages along the ICW either because its all built up. That being said, its a great place to launch an expedition to the Bahamas/Bimini. Plus there IS cheap(er) dockage especially at private docks up and down the canals. Bridges are a bit of a pain, but the New River is all on-demand...the current tends to rip through there and watch out for Jungle Queen...she takes those riverbends at full throttle. Ever seen a 2 story dinner cruise throw up rooster tails? I have
If you can get away with it, I'd keep the boat in Miami. Biscayane Bay has more traditional "cruising" grounds, but for your Beneteau 40 (assuming a standard keel of 6 ft) you're going to face draft issues as well as air draft issues as there are fixed 55' bridges to deal with.
That being said, Miami has a ton more in terms of anchorages, is just as convenient to the Bahamas as many people track as far south as possible before heading east for a Gulfstream crossing. Also, the Key's are a weekend trip...whereas in Fort Lauderdale its more of a long weekend/vacation type excursion.
Miami will be more pricey for dockage and you're more likely to deal with little annoyances like petty theft/bad attitudes, but...it has its perks. Hell of a skyline to watch a sunset over in front of Rusty Pelican with a drink in one's hands.