The passage of the tile can be set in the Database > Tilesets. That would be the easiest way to let the player walk on the roof but also the most difficult to "deal with" imo as the player could abuse it in later maps if used again. You could probably use eventing and regions to do it, I think for this I would just modify the tileset to have two of those roof tiles and you could then set passage on your second tile and make a path on the roof through the non-passable ones. Sure there are also many other ways as well. Good luck.
You can walk around on top of a roof, but you can only get off by going down - a ladder or vine climbing up the front wall, for example. This is the default passability of the A roof tiles. You cannot modify the passage settings for autotiles.
If you mean they cannot walk AT ALL, not even to the edges of the roof, then check to see if you can turn different directions and open menus. If you can't, it means you've got an autorun event somewhere that's turned on.