James Madison's political consistency is something often discussed by historians especially in the wake of Gordon Wood's titular "The James Madison problem". Madison lived long enough himself to see his own actions during the 1800 crisis used against the Union by the likes of John C Calhoun during the nullification crisis in Jackson's presidency, despite taking up his pen and denying Calhoun's use of his and Jefferson's words. But to ignore the larger question of Madison and focus more narrowly on your question, I would say the answer is no.
I think we should first understand that Federalists and Anti-Federalists were not parties, but rather state and local passing factions at best that didn't have a great deal of coordination or action at the interstate level. Members of these factions could often have radically different stances on ratification, and indeed what separated a federalist from an anti-federalist could be very minor. Not to mention someone could start in one camp and then move to the other (as Jefferson did). Plenty of anti-federalists only had 1-2 qualms with the constitution (often term limits) but otherwise agreed with the need for a stronger national government. Especially as more ardent Federalists, like Hamilton, abandoned their stance on ratification without amendments many in the Anti-Federalist camp became Federalists. As it would turn out wrangling the dozens of amendments passed by the States to the Constitution fell on Madison and what would become the Bill of Rights. Moving on, the Anti-Federalist last attempted hurrah was by trying to win the first elections and then refusing to govern making the new government effectively defunct but failed in their effort.
Several years pass, and opposition to various proposals from the national government increased. The proponents and opposition of these proposals loosely became proto-parties in the form of the Federalists and the Republicans ( although in reality there were dozens if not hundreds of different names and confusingly some referred to themselves as Federalists-Republicans or Republican-Federalists). However I want to emphasize that these were not straight line continuations of the Federalist and Anti-Federalist factions. Rather the proto-party Federalists seized on the name "Federalist" for political ends, much as the Jeffersonians seized on "Republican", words have power and both words referred to the Constitution and the Revolution. It comes as no surprise then that those who supported and opposed the constitution ended up in both the Federalist and Republican camps, Madison most notably for the Republicans and Patrick Henry most notably for the Federalists.