You configure Custom Error page in WebsitePanel but IIS error page shows up.
Reason: IIS is configured to display detailed error by default.
To enable custom error on your website, please add errorMode setting in web.config file as follows
<httpErrors errorMode="DetailedLocalOnly">
</httpErrors>