OS X autoswitch the input method
If the custom keyboard layout is in ~/Library/Keyboard Layouts/, have you tried moving it to /Library/Keyboard Layouts/? That would normally prevent it from being switched to a default layout in password dialogs.

If you don't need the Belgian layout, there's also a hacky way to disable the default layouts.