“Sometimes I like to just hide in the shadows,” mutters Madonna at the start of “I Feel So Free,” the opening track on her 15th album “Confessions II.” “Create a new persona. A different identity. I can be whoever I want to be.” As hard as it may be to picture Madonna hiding in the shadows of anything, that’s the thrill of any new album from her: guessing which version we’ll be getting. Will it be a cowgirl kicking up dust this time? A pop eccentric? A spiritually reborn idealist with a penchant for chanting and sitars?

Madonna made it clear at the start of the promotional cycle for “Confessions II” that her first album in seven years would be a return to the dance floor, a sequel to her seismic 2005 album “Confessions on a Dance Floor” that, by all counts, was the last time she conceived a project with such a fully realized scope. And it’s an approach that’s paid off: “Confessions II,” a 16-track album mainly produced by Madonna and producer Stuart Price, who sat at the helm of “Confessions on a Dance Floor,” is easily the best album that Madonna has made in two decades, a palpable record that celebrates the thrill of the dance floor while embracing its mystique.

“Confessions II” is an album where form meets function, assembled as a continuous DJ mix much like the original iteration of “Confessions on a Dance Floor.” (That version, added back to streaming last year, is part and parcel the most arresting Madonna record this century.) It allows for a continuous flow state to tell a full story, one of dance floor abandon, of reveling in the anonymity of a dimly lit room and the space it creates for reinvention. At the start of many tracks, Madonna whispers of the freedom that the cloak of darkness provides; she materializes it, quite literally, in the video for “Bring Your Love” featuring Sabrina Carpenter, soaring above a crowd of bodies like an otherworldly specter.