Why does Shakespeare call attention to the fact that his plays are fictional?
Your premise that “he uses such devices as the ‘play within a play’ …(to) make it obvious to the audience that they are watching a play” may be faulty. Why do you believe that is the purpose of this device? In Hamlet, it is clear that the purpose of the Player’s play is to flush out Claudius as the killer of Hamlet’s father. In A Midsummer Night’s Dream, here are some thoughts: Because the craftsmen are such bumbling actors, their performance satirizes the melodramatic Athenian lovers and gives the play a purely joyful, comedic ending. Pyramus and Thisbe face parental disapproval in the play-within-a-play, just as Hermia and Lysander do; the theme of romantic confusion enhanced by the darkness of night is rehashed, as Pyramus mistakenly believes that Thisbe has been killed by the lion, just as the Athenian lovers experience intense misery because of the mix-ups caused by the fairies’ meddling. The craftsmen’s play is, therefore, a kind of symbol for A Midsummer Night’s Dream itself: