End portals (as in the actual end portal blocks, not end portal frame blocks) do NOT obstruct beds. This means that you can place a bed under an end portal, sleep in it, and your spawnpoint will be set in the end portal. This can lead to survival players being permanently trapped in The End, as they will just end up teleporting back when they kill themselves. It is possible to get out in multiplayer if another player breaks the bed, but this is not a solution for singleplayer. Additionally, I don't think it makes sense that portals of any type are not considered obstructions to beds, but of course, this is up to the developers to decide.
- Build/find an end portal in the overworld and activate it.
- Place a bed directly underneath the portal, so that both ends of the bed are under end portal blocks and the player will spawn in the end portal.
- Set the time to night. (/time set night)
- Enter the bed.
- When the player wakes up, they will be instantly teleported to The End.
- Switch to survival mode if you are not already, and kill yourself.
- Notice that when you respawn, you end up teleporting to The End instantly, trapping you there permanently until the bed is broken or your spawnpoint is otherwise changed.
If cheats are enabled, you can use /spawnpoint to change your spawnpoint to somewhere other than the end portal in the overworld, allowing you to escape. This is not an option for survival worlds with cheats disabled, however.
Bonus: After setting up this bug and effectively trapping yourself in The End, use /setblock ~ ~-1 ~ portal to place a nether portal block in The End, and try entering it. You'll end up travelling to the overworld, but then get teleported back to The End... but the sky will change from the normal void sky to the Overworld sky. Entering the nether portal again will change the sky back to normal.